pichillilorenzo / JavaScriptEnhancements

JavaScript Enhancements is a plugin for Sublime Text 3. It offers not only a smart javascript autocomplete but also a lot of features about creating, developing and managing javascript projects (real-time errors, code refactoring, etc.).
MIT License
638 stars 41 forks source link

Had to manually run `npm install` #40

Open davidnormo opened 6 years ago

davidnormo commented 6 years ago

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

Thanks for making such a helpful package 👍

pichillilorenzo commented 6 years ago

@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 commented 6 years ago

@davidnormo any news?

orangecoloured commented 6 years ago

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

pichillilorenzo commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

@orangecoloured Thank you for the support!