Unable to start node-red after upgrade to 1.0.2

i have updated node-red to 1.0.2. when i tried to launch it typing node-red in terminal. it wont be launch it!!
Sans%20titre

Does it go straight back to the command prompt after the dashboard message?
Was it working before you upgraded?
Exactly how did you upgrade?
Node 12.x is not currently a recommended version of node.js (should be 8.x or 10.x) but I would be surprised if that were the problem.

my earlier version was 0.20.5 for node-red and v10 for nodejs
i used this command to upgrade node-red version

npm install -g --unsafe-perm node-red

then i installed new version of nodejs.

yes it does.

After you install a new version of node.js you have to rebuild all the nodes. However since you are now using an unsupported version of nodejs you might be better to change it to 10.x first.

To rebuild all the nodes first re-install node-red (which will rebuild it for the new node.js) then go to your .node-red directory and run
npm rebuild

That is not true. We support node 12 and have done for some time, although node 10 has been the recommended version.

Node 12 became the LTS release this week. We have not seen any runtime issues with Node 12. The only issues we have seen are the odd install time issues with 3rd party modules. But they are few and far between.

If a user reports a problem with a running system and says they are using Node 12, please do not suggest they ought to try using a different version of Node.

The docs say that support for 12.x is "tentative", and that 10.x is the recommended version., It seems not seem unreasonable that I recommend that the recommended version is used. The node red docs recommend 10.x so for me to recommend using a version for which support is only tentative would surely not be justifiable.

However I did also say that I thought that the nodejs version was not likely to be the problem.

Point taken though, I will not suggest downgrading from 12 in the future.

You said 12 was unsupported. That is the statement I was trying to correct.

12 has only just become LTS and we'll be updating the docs to reflect this real soon.

In my case, i can confirm that node-red is not being launched because of nodejs v12. i have changed to v10.16.0 and it works.
Maybe because of windows 10, nodejs v12 and node-red v1.0.2 does not work!!!
i have tried to install the two new version in raspberry and it worked. Also i have noticed some changes like "layout" button in dashboard.

Did you re-install node-red and run npm rebuild before deciding that it did not work with node 12, or did you just go back to 10 (if that is what you were on previously) and found it did then work?

Yes, i have tried every thing you suggested to me before i go back to 10.
i re-install node-red then i run npm rebuild inside .node-red folder and it ends with a lot of errors!

deasync@0.1.14 install C:\Users\lenovo.node-red\node_modules\deasync
node ./build.js

C:\Users\lenovo.node-red\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack at VisualStudioFinder.fail (C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack at C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:344:14)
gyp ERR! stack at C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack at C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:365:16
gyp ERR! stack at C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack at C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack at ChildProcess.exithandler (child_process.js:302:5)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\lenovo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\lenovo.node-red\node_modules\deasync
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
Build failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! deasync@0.1.14 install: node ./build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the deasync@0.1.14 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

then i decided to go back to node10

Well I am not a Windows man so some guesswork involved here, but looking at the output it appears that it is not a node-red issue but a Visual Studio issue. So my suggestion that it would be enough to re-install node red and run npm rebuild should have said to first check that you have a version of VS compatible with node 12.

By the way it is better to copy/paste terminal output here rather than post a screenshot if possible. It is much easier to read than trying to zoom in on an image.

1 Like

Also was there anything at the end of those errors, often rebuilding nodes produces errors along the way but at the end it completes ok by other routes.

No there was not anything else at the end.

In that case I will leave for a Windows user to comment.

@knolleary any comment on this? I don't know enough about running on node-red to understand the problem.

The log tells you exactly what you need to do:

That is what I thought, but it doesn't say anything in the
node-red windows docs about needing Visual Studio, which confused me. I am not trying to run on Windows just seeking the light.

You don't need visual studio to install Node-RED.

You need VS to build any binary components of 3rd party nodes you may want to install.

Yes the docs could mention that.

But equally, reading the logs of any error you get is probably the place to start rather then assume the documentation covers every eventuality.

1 Like

You'll need build tools...

npm install --global windows-build-tools

OK, just to confirm then, the reason it won't build with node 12 but does with node 10 is because the version of Visual Studio installed is not compatible with node 12.
I know that is what the error says the problem is, but npm is notorious for spewing out loads of messages that are either irrelevant or misleading.

2 Likes