Hi folks,
I am absolutely going bonkers after a domain change done on a PC (windows) and post which I am not able to start node-red via cmd-command. I can see the node files in .node folder but the application wont start.
I beginning to panic since a lot is in the project and everything has stopped. Please assist...
OK, so this is a minor issue. And reinstalling nodes is actually very simple. Node-RED is a node.js app and uses npm to manage package installation which is entirely standard. There is a package.json file in your ~/.node-red folder that defines all of the installed packages.
But in this case, the only issue is that you are using a terminal prompt that is failing to understand where Node-RED is installed.
Can you type node --version at that terminal prompt. This will make sure that it is Node-RED's command that is the issue and not node.js itself.
If that command works OK, I would suggest simply running npm install node-red -g again - assuming you are using at least node.js v20, if not, please start by upgrading node.js to the current "LTS" version by following the instructions on their website (it is a simple download and install of the new version).
Reinstalling node-red this way will not impact your existing flows and data but should reinstate the path that Windows needs to find the command. You will need to close the terminal after reinstallation and start a new session, you shouldn't need to restart the computer but occasionally, you may have to log out and back in to get the updated path correctly.
Hey thanks a ton mate...Now got it to start...but cannot see any of my flows ,nodes etc. do I need to copy the contents of the old .node folder and paste it in the new one ??Is that how it works?