nvm (Node Version Manager) users often see this error for the first time inside VS Code's Integrated Terminal:
nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"
Run `nvm use --delete-prefix v8.12.0 --silent` to unset it
According to the solution here: https://github.com/Microsoft/vscode-docs/blob/master/docs/editor/integrated-terminal.md#why-is-nvm-complaining-about-a-prefix-option-when-the-integrated-terminal-is-launched
I have to find the old npm install path first then run "which npm" before it.
But where is the nvm initialization script and how to run "which npm" before it, just add line at the beginning of the script? Is there any other way to fix the problem?
run this
$ npm config delete prefix
$ npm config set prefix $NVM_DIR/versions/node/v8.12.0
solution is from nvm is not compatible with the npm config "prefix" option:
Setting debug.node.autoAttach
to disabled
worked for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With