Comments (7)
Hi @pschaumburg
The code is not working because you are overriding one of your exports with the other. Your main.js
could be made into this to work
'use babel';
import chefProviderRecipes from './chef-provider-recipes';
import chefProviderMetadata from './chef-provider-metadata';
export function activate() {
require('atom-package-deps').install('language-chef')
.then(function() {
console.log('All dependencies installed, good to go')
})
}
export function getProvider() {
return [
chefProviderMetadata,
chefProviderRecipes
];
}
Edit: Again it's because export default
overrides module.export
from package-deps.
Hi steelbrain,
Thank you for your fast response. I'm sorry for this (it is my first js experience
I've changed the main.js as mentioned, but receiving this:
Failed to activate the language-chef package
Cannot find module 'atom-package-deps'
Error: Cannot find module 'atom-package-deps'
at Module._resolveFilename (module.js:470:15)
at Module._resolveFilename (/Applications/Atom.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.get_Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app/src/module-cache.js:354:58)
at Module.require (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:40:43)
at require (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:66:33)
at Object.activate (/Users/pstecracer/Documents/Repositories/language-chef/lib/main.js:7:3)
at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:230:33)
at measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:206:33)
at Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:88:25)
at activationPromise.Promise (/Applications/Atom.app/Contents/Resources/app/src/package.js:200:20)
at Promise (<anonymous>)
at Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:198:38)
at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:695:42)
at config.transactAsync (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:670:36)
at Config.transactAsync (/Applications/Atom.app/Contents/Resources/app/src/config.js:866:28)
at PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:668:23)
at PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:647:50)
at loadStatePromise.loadState.then (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:871:27)
at <anonymous>
from package-deps.
@pschaumburg It appears that while you've added the dependency in dependency-inspec
branch https://github.com/sous-chefs/language-chef/blob/aa9beaeabfb52a192e469b59caadc9f49c712294/package.json#L25, you have not added it in the master branch https://github.com/sous-chefs/language-chef/blob/186d04198c5af447aaa580c9855edb20c6f5655d/package.json#L24
So you may wanna do a npm i atom-package-deps
in the master branch as well :)
from package-deps.
Yes, that's right.
My master branch is the branch, which is fully up to date and available on atom.io.
So I'm currently working in my branch feature/dependency-inspec
The branch is linked locally with apm link.
from package-deps.
Yes but you have to add the dependency on it with npm install atom-package-deps
for that error to go away
from package-deps.
Sorry, I don't understand this behaviour :/
I thought, that the dependency within the package.json is enough to install the npm package automatically. Or am i wrong?
But I also have done your advise:
I just ran npm i atom-package-deps
and it installed your package. After a restart of Atom, the popup came up and i could install language-inspec.
from package-deps.
Your last comment says that you were able to get the popup and install the dependency. So closing this as resolved, feel free to continue discussing
from package-deps.
Related Issues (20)
- Cannot configure package-deps to install package dependancies. HOT 2
- Installing package with dependencies fails on Windows HOT 11
- showPrompt fails HOT 7
- `packageDeps.install()` causes exception "querySelector is not a function" HOT 2
- Stop enabling the notifications package
- Optional dependencies HOT 2
- An in-range update of semver is breaking the build π¨ HOT 1
- Doesnβt prompt to install sub-dependencies
- Move package-deps to `apm` HOT 3
- Allow specifying a `package.json` for installation without Atom running
- 'patch-package' is not recognized as an internal or external command HOT 2
- Bring option for setting the prompt to off HOT 3
- packages installation for node fails on windows
- Cannot read property 'length' of undefined at lib/index.js:930:26 HOT 5
- Error during showing installation progress to user
- Dependencies fail to install when there is a space in Atom's install path HOT 2
- atom-ide-base main tests fail to activate the packages HOT 1
- Doesn't Recognize Github Format HOT 2
- maximum required version HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from package-deps.