Hi, I seem to have managed to screw up my Node Red Installation (Running Win7 on a stand alone machine).
I had tried to run an update without realising that the latest versions of nodejs are no longer supporting Win 7. I have done a windows rollback and re-installed my old version of nodejs and npm but Node Red will not start correctly (see attached log)
I did a backup of my .node-red directory before starting the update but the old directory and files still appears intact so I'm uncertain if I need to copy the backup back to the original directory.
Thought I would run this past the experts before screwing things up further. Hope someone can offer a helpful suggestion.
the error is complaining about package.json.... so you need to check what has messed up in there. It is obviously broken somehow - there was an issue with Node-RED 1.2.0 (or so - but now corrected since 1.2.2 I think) - where npm would add invalid characters to dependency package names. You can share your package.json here if it would help.
Hmm. Not sure how that happened dceejay. I loaded the file again in notepad ++ from the .node-red directory and the the comma is there correctly. Not sure why it did not paste across.
Still does not load Node Red though. Exactly the same errors.
Has me scratching my head. Luckly I backed up my flows and I can still run them on my Pi but I use my PC for development work so would prefer getting it running again. Do appreciate any suggestions.
Thanks, I re-edited the package file this time using Atom and the comma was missing. Strange. Having re-inserted the comma I saved the file back and tried restarting Node Red. This time I got a different much longer error message as pasted below.
Preformatted text.
Your environment has been set up for using Node.js 12.20.0 (x64) and npm.
C:\Users\Michael>node-red
2 Jan 16:05:14 - [info]
Welcome to Node-RED
2 Jan 16:05:14 - [info] Node-RED version: v1.2.6
2 Jan 16:05:14 - [info] Node.js version: v12.20.0
2 Jan 16:05:14 - [info] Windows_NT 6.1.7601 x64 LE
2 Jan 16:05:14 - [info] Loading palette nodes
2 Jan 16:05:16 - [info] Dashboard version 2.26.1 started at /ui
2 Jan 16:05:16 - [warn] ------------------------------------------------------
2 Jan 16:05:16 - [warn] [node-red-contrib-viseo-ffmpeg/ffmpeg-command] Error: Ca
nnot find module 'node-red-viseo-helper'
Require stack:
C:\Users\Michael\AppData\Roaming\npm\node_modules\node-red\red.js
2 Jan 16:05:16 - [warn] [node-red-contrib-rfxcom/rfxcom] Error: The module '\?
C:\Users\Michael.node-red\node_modules@serialport\bindings\build\Release\bindi
ngs.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
2 Jan 16:05:16 - [warn] [node-red-node-serialport/serialport] Error: The module
'\?\C:\Users\Michael.node-red\node_modules\node-red-node-serialport\node_modul
es@serialport\bindings\build\Release\bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
2 Jan 16:05:16 - [warn] [node-red-contrib-join/join] Type already registered
2 Jan 16:05:16 - [warn] [node-red-contrib-node-tradfri/tradfri] Error: Cannot fi
nd module 'C:\Users\Michael.node-red\node_modules\node-aead-crypto\build\Releas
e\node-v72-win32-x64\node_aead_crypto.node'
Require stack:
You have not restored the original version of nodejs, or you rebuilt the nodes with a different version and have now restored the original.
Go into your .node-red folder and run npm rebuild
and npm install
which should sort that problem out.
Huge thanks. You guys are heros. I have Node Red back. Only minor problem is I am missing a couple of Nodes that I had installed previously but I can soon sort that. Once again thank you.
No. I had not touched it. To be honest I leave those files alone. I first set up Node-Red about 15 months ago and I am still on a steep learning curve. I do get some errors when I try to update nodes and I suspect that has something to do with my original setup and directories.