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

Explicitly specified interpreter is lost when running "npm\bin\npm-cli.js" #207

Open
segrey opened this issue Aug 16, 2017 · 4 comments
Open

Comments

@segrey
Copy link

segrey commented Aug 16, 2017

  1. Have PATH containing several node installations (C:\Program Files\nodejs and C:\Program Files\Nodist)
  2. Run C:\Program Files\Nodist\bin\node C:\Program Files\Nodist\npm\bin\npm-cli.js
  3. Underlying npm process is running with C:\Program Files\nodejs\node.exe, not one from Nodist.

Yeah, I know that "Nodist was designed to replace any existing node.js installation, so if node is already installed on your machine, uninstall it first.". However, seems it plays with other node installations nicely in other cases. Would be great to make it friendly here too. BTW, thanks for the tool!

@marcelklehr
Copy link
Member

Why are you not running npm.exe?

@marcelklehr
Copy link
Member

try set DEBUG=nodist:shim-node

@robrich
Copy link
Collaborator

robrich commented Aug 18, 2017

Put nodist earlier in your PATH than regular node processes, restart any shells, and it'll use nodist instead of node. Better still, uninstall node. :D

@segrey
Copy link
Author

segrey commented Aug 18, 2017

Why are you not running npm.exe?

I'm using WebStorm and it runs npm commands with explicitly specified interpreter, e.g. C:\Program Files\Nodist\bin\node.exe C:\Program Files\Nodist\npm\bin\npm-cli.js info karma

Looks like it's caused by running Nodist\bin\npm.exe in Nodist\npm\bin\npm-cli.js: current interpreter running npm-cli.js is lost and npm.exe will use interpreter from PATH. It's in compliance with output of set DEBUG=nodist:shim-node: there is only one log entry with Going to execute the following binary (when npm-cli.js is starting execution).

Put nodist earlier in your PATH than regular node processes, restart any shells, and it'll use nodist instead of node.

That works, thanks. However, it requires manual PATH configuration.
Feel free to close this issue if nodist is not designed to live with other existing node.js installations as stated in the description.

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