Unable to start node-red after upgrade to 1.0.2

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! 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.


some packages ship with pre-built versions of binaries for the most popular platforms (eg serialport) - so don't need tools - but if there is a combination they don't have (or there is no prebuild) then they have to be built - eg serialport on Armv6 for Pi - so it is entirely possible that this package may have shipped node10 binary but not yet node12 - etc.
( this is the the main long standing reason we recommended the LTS versions of Node.js ).

Our windows install docs do talk about how to install tools if anyone reads down that far.

Ah, so the Windows Build Tools include the Visual Studio stuff.

Yeah. That npm install includes the necessary MS VS bits n bobs etc (not visual studio mind)

That is what was confusing me, the error says
You need to install the latest version of Visual Studio whereas I see now that actually means the Build Tools from VS not VS itself. So once again messages from npm/gyp spread confusion (in me anyway). Now dispelled thanks to help from here :slight_smile:

I could have been little clearer.

The npm install installs Vs compiler and python and all bits necessary for nodejs compilation on windows.
Visual studio not installed and it is not necessary for nodejs :slight_smile:

Yes, I understood that, thanks. Hence the error message "You need to install the latest version of Visual Studio" is not accurate. It should be something like "You need to install the Windows Build Tools"

thank you all for your suggestions, and i'am too much get interested about new features added to 1.0.2 version.
i will give a shot and see what i get.

You don't need to upgrade nodejs to use 1.0.2