Read the statement by Michael Teeuw here.
cannot install pm2
-
@sdetweil ok done. Now should I try
bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)"
again? -
@mrlowndes yes
-
@sdetweil same result:
pi@raspberrypi:~ $ bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)" the log will be saved in /home/pi/MagicMirror/installers/pm2_setup.log npm ERR! Unexpected end of JSON input while parsing near '...s":{"moment-timezone"' npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-29T20_19_40_905Z-debug.log bash: line 103: pm2: command not found bash: line 180: pm2: command not found bash: line 183: pm2: command not found
-
@mrlowndes ok, time to get crazy , kill all npm stuff
/cd ~ sudo apt-get purge -y npm sudo rm -rf .npm sudo apt-get install -y npm cd MagicMirror rm -rf node_modules npm install
then do the fixuppm2 script again
-
@sdetweil still nothing:
pi@raspberrypi:~ $ bash -c "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/fixuppm2.sh)" the log will be saved in /home/pi/MagicMirror/installers/pm2_setup.log npm ERR! Unexpected end of JSON input while parsing near '...pes/node":"^12.7.5","' npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-04-29T21_00_10_606Z-debug.log bash: line 103: pm2: command not found bash: line 180: pm2: command not found bash: line 183: pm2: command not found
-
@mrlowndes said in cannot install pm2:
npm ERR! Unexpected end of JSON input while parsing near '…pes/node":"^12.7.
u are getting weird failures…
every time we have seen this, it is the SD card failing.
-
hmm good question.
-
@sdetweil should be fine its a SanDisk Ultra Plus 64GB U1 SDXC
-
@sdetweil if it is the SD card, is it the kind of thing a deep format and reinstall of Raspbian will fix, or is the SD just terminally bad? Wen I reinstalled Raspbian the last time, I did just do a quick format on this card before flashing the image.
-
@mrlowndes when the sd card starts to fail, it is toast