Bash: /home/ubuntu/.nvm/versions/node/v8.2.1/bin/npm: No such file or directory

npm

#1

Hi,

I receive this error everytime I try to run npm:

~/workspace (master) $ npm -v
bash: /home/ubuntu/.nvm/versions/node/v8.2.1/bin/npm: No such file or directory

~/workspace (master) $ npm run dev
bash: /home/ubuntu/.nvm/versions/node/v8.2.1/bin/npm: No such file or directory

~/workspace (master) $ nvm debug
nvm --version: v0.31.0
$SHELL: /bin/bash
$HOME: /home/ubuntu
$NVM_DIR: ‘$HOME/.nvm’
$PREFIX: ‘’
$NPM_CONFIG_PREFIX: ''
nvm current: v8.2.1
which node: $NVM_DIR/versions/node/v8.2.1/bin/node
which iojs:
which npm: /mnt/shared/sbin/npm
npm config get prefix: bash: $NVM_DIR/versions/node/v8.2.1/bin/npm: No such file or directory
npm root -g: bash: $NVM_DIR/versions/node/v8.2.1/bin/npm: No such file or directory

Does anyone know what is causing this error and how can I fix it?

Regards,

Kenneth


#3

Looks like you might have tinkered with something that wasn’t supposed to be tinkered with :wink: There are a couple instances of people doing this. Take a look at one of these and see if you can find a silver bullet for your instance of the issue: