'npm' could not be spawned.
Opened this issue · 17 comments
Hi @diegodebonis, thanks for reporting that!
We need to work on compatibility with Windows :/
Please bear with us!
Hey @rayrutjes thanks for the quick answer, i would like to say also that in linux works properly. The issue seems to be in Windows.
Regards!
Yes, we do not support Windows currently.
I need to take a look at the way we spawn npm or yarn there.
@diegodebonis do you have npm or yarn installed on your machine?
npm 5.3.0
I've got no windows machine to test the plugin.
Here is the actual line that might need to be adjusted in windows https://github.com/algolia/atom-autocomplete-module-import/blob/master/lib/project.js#L39
Is npm installed globally on your machine? Can you run npm
from anywhere?
Yes i can run npm
anywhere. I've setted up the env variables.
Can you run the following to see what it outputs?
$ where npm
$ process.env.PATH
I think I'm gonna need the help of a Windows Guru here :/
I'm at work right now (i live in Argentina), but as soon as i arrive to my place i will run those commands.
Thanks a lot @diegodebonis , no rush ;)
What @rayrutjes meant with the second part was
$ node -e "console.log(process.env.PATH)"
We need to make the path to the executable configurable.
https://github.com/npm/node-which should solve this I think
So i have to install node-which
globally?
So i have to install node-which globally?
No but instead of blindy trying to launch "yarn" or "npm" here:
atom-autocomplete-module-import/lib/project.js
Lines 37 to 39 in e719f73
You could use node-which to get the actual path of the program on any platform (and get an error when not found). That should solve it.
Are you open to trying it?