2020-04-15T08:59:58.980Z Install : node-red-node-serialport 0.10.1
2020-04-15T08:59:59.018Z npm.cmd install --no-audit --no-update-notifier --save --save-prefix="~" --production firstname.lastname@example.org
2020-04-15T09:00:09.260Z [err] npm
2020-04-15T09:00:09.260Z [err] ERR! Unexpected end of JSON input while parsing near '...TlDXbBxd3yyzp1XKWDzE+'
2020-04-15T09:00:09.291Z [err] npm ERR! A complete log of this run can be found in:
2020-04-15T09:00:09.291Z [err] npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2020-04-15T09_00_09_261Z-debug.log
Could you run the install from the command line and post the result please. So go to your node-red folder (wherever that is on Windows, where your flows file is) and run
npm install node-red-node-serialport
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\User\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\User\package.json'
npm WARN User No description
npm WARN User No repository field.
npm WARN User No README data
npm WARN User No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: email@example.com (node_modules\bcrypt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: firstname.lastname@example.org install:
node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
Do that and try again.
If you don't know where that is then look at the node red startup log. It is where the flows file is.
C:\Users\User.node-red>npm install node-red-node-serialport
npm ERR! Unexpected end of JSON input while parsing near '...TlDXbBxd3yyzp1XKWDzE+'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2020-04-15T17_32_31_971Z-debug.log
That's interesting, that looks as if it might be another npm cache corruption, if so that is the second today and I can't remember if I have ever seen that before, certainly not for a long time. This fixed it for the other instance.
npm cache clean --force
I wonder whether the npm repository had a hiccup and was serving out garbage for a while. Otherwise it is a remarkable coincidence that two users independently get garbage in the npm cache on the same day.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.