MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Error on npm install

    Scheduled Pinned Locked Moved Solved Troubleshooting
    14 Posts 3 Posters 8.0k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rmeskill
      last edited by

      @sdetweil said in Error on npm install:

      @rmeskill looks like node is also downlevel

      Do you mean I should upgrade it? this isn’t enough:

      pi@raspberrypi:~/MagicMirror $ node -v
      v11.6.0
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @rmeskill
        last edited by

        @rmeskill that is a surprise

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • R Offline
          rmeskill
          last edited by

          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
          /home/pi/.nvm/versions/node/v11.6.0/bin/npm
          pi@raspberrypi:~/MagicMirror $ which node
          /home/pi/.nvm/versions/node/v11.6.0/bin/node
          
          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil
            last edited by

            @rmeskill said in Error on npm install:

            .nvm/

            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).

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • R Offline
              rmeskill
              last edited by

              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 https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)"
              

              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
              v9.11.2
              pi@raspberrypi:/ $ npm -v
              6.5.0
              

              Thanks everyone for the help!

              1 Reply Last reply Reply Quote 1
              • 1
              • 2
              • 2 / 2
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy