nvm is not compatible with the npm config "prefix" option code example

Example 1: "Run `npm config delete prefix` or `nvm use --delete-prefix v12.14.1 --silent` to unset it."

# Solution, your version (e.g. v10.16.0) might be different.
# run to determine your version number
ls -l $NVM_DIR/versions/node

# to be able to start node
nvm use --delete-prefix v10.16.0

# to ensure that it’s working
node

# to ensure that it’s deleted
npm config delete prefix

# to set it back
npm config set prefix $NVM_DIR/versions/node/v10.16.0

# So, basically I needed to reset nvm prefix.

Example 2: nvm is not compatible with the npm config "prefix" option: currently set to "/usr/local"

$ npm config delete prefix 
$ npm config set prefix $NVM_DIR/versions/node/v6.11.1

Tags:

Misc Example