Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Had to manually run npm install #40

Open
davidnormo opened this issue Mar 13, 2018 · 6 comments
Open

Had to manually run npm install #40

davidnormo opened this issue Mar 13, 2018 · 6 comments

Comments

@davidnormo
Copy link

Expected Behavior

  1. Install the package
  2. Add the following to a .js file: let a = 'abc'; a.
  3. Then hit ctrl+space to see autocompletions
  4. Dropdown should appear with options

Actual Behavior

  1. Install the package
  2. Add the following to a .js file: let a = 'abc'; a.
  3. Then hit ctrl+space to see autocompletions
  4. Error in sublime console (ctrl+`):
Error: Cannot find module '~/Library/Application Support/Sublime Text 3/Packages/JavaScript Enhancements/node_modules/.bin/flow'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

To fix I manually cd'd into the Javascript Enhancements directory and ran npm install.

Specifications

  • Sublime Text 3 build: 3143
  • OS: MacOS Sierra 10.12.6
  • JavaScript Enhancements version: 0.16.1

Thanks for making such a helpful package 👍

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Mar 13, 2018

@davidnormo Did you get an error about npm before this in the Sublime Text console?? If you can, post here the Sublime Text console logs after the installation of this package. Thanks!

@pichillilorenzo
Copy link
Owner

@davidnormo any news?

@orangecoloured
Copy link

Having the same issue.
Why is it looking for a local flow when I have it installed globally?

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented May 22, 2018

@orangecoloured because I specify the version of Flow and I update the code of the plugin, if necessary, to work with it. If the Flow team changes its API, I need to change the behaviour of the plugin accordingly. For example if you have an older version of flow, maybe there could be errors because your version doesn't have a particular feature or maybe it works in a different way. However I will add also the possibility to specify a custom path for Flow per project, but, depending on the flow version, some features could not be available. Any advice is welcome!

However if you had the same issue, maybe some other features that uses node.js or npm could not work as well, so can you post Sublime Text console logs? Also, what OS do you have?

Thanks!

@orangecoloured
Copy link

@pichillilorenzo it's working now! For some reason it didn't download anything and didn't work. I had to restart ST twice to see that it was installing its packages. So, everything's fine now. Thanks!

@pichillilorenzo
Copy link
Owner

@orangecoloured Thank you for the support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants