GithubHelp home page GithubHelp logo

Comments (7)

steelbrain avatar steelbrain commented on July 30, 2024

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.

pschaumburg avatar pschaumburg commented on July 30, 2024

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.

steelbrain avatar steelbrain commented on July 30, 2024

@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.

pschaumburg avatar pschaumburg commented on July 30, 2024

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.

steelbrain avatar steelbrain commented on July 30, 2024

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.

pschaumburg avatar pschaumburg commented on July 30, 2024

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.

steelbrain avatar steelbrain commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.