MagicMirror² v2.7.0 is available! For more information about this release, check out this topic.

Error on npm install

  • @rmeskill that is a surprise

  • Now I’m trying to remove npm and nodejs to start again, but even after I’ve run apt-get remove npm nodejs I still get this:

    pi@raspberrypi:~/MagicMirror $ which npm
    pi@raspberrypi:~/MagicMirror $ which node

  • @rmeskill said in Error on npm install:


    looks like node version manager (nvm) was used to install these…

    you could temporarily remove those folders from the PATH environment variable.

    or search for remove nvm… and found

    No, all you need to do is remove $NVM_DIR (~/.nvm is the default), and the relevant 2 lines in your profile file (but you also can leave those behind, since they’re guarded by a file existence check).

  • Seems my reply to this got lost…

    Got this working! Removed the .nvm directory, removed the symlinks, shutdown pm2 and re-ran the installation script and it all went in fine!

    sudo rm -rf ~/.nvm
    sudo rm -f /usr/local/bin/node
    sudo rm -f /usr/local/bin/nvm
    pm2 stop mm
    sudo rm -rf ~/MagicMirror
    bash -c "$(curl -sL"

    I got an error on npm not being the right version, so upgraded that:

    sudo npm i -g npm

    (Note sudo is working now, which it wasn’t before) And now my node and npm versions look good and pm2 is running MagicMirror again!

    pi@raspberrypi:/ $ node -v
    pi@raspberrypi:/ $ npm -v

    Thanks everyone for the help!