Unable to install node-red-node-arduino

I'm completely new to Node Red and I'm having a bit of trouble managing palettes (Node Red is running locally). While trying to install node-red-node-arduino it fails and I'm left with the following log, could someone shine some light as to what the issue is?

2021-05-26T06:43:06.901Z Install : node-red-node-arduino 0.3.1

2021-05-26T06:43:06.872Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-arduino@0.3.1
2021-05-26T06:43:18.272Z [err] npm
2021-05-26T06:43:18.273Z [err] ERR! code 1
2021-05-26T06:43:18.273Z [err] npm ERR! path C:\Users\Administrator.node-red\node_modules@serialport\bindings
2021-05-26T06:43:18.279Z [err] npm
2021-05-26T06:43:18.279Z [err] ERR! command failed
2021-05-26T06:43:18.279Z [err] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-05-26T06:43:18.279Z [err] npm
2021-05-26T06:43:18.279Z [err] ERR! gyp info it worked if it ends with ok
2021-05-26T06:43:18.279Z [err] npm ERR! gyp info using node-gyp@7.1.2
2021-05-26T06:43:18.279Z [err] npm ERR! gyp info using node@16.2.0 | win32 | x64
2021-05-26T06:43:18.279Z [err] npm ERR! gyp info find Python using Python version 3.9.5 found at "C:\Python39\python.exe"
2021-05-26T06:43:18.279Z [err] npm ERR! gyp ERR! find VS
2021-05-26T06:43:18.279Z [err] npm
2021-05-26T06:43:18.279Z [err] ERR! gyp ERR! find VS msvs_version not set from command line or npm config
2021-05-26T06:43:18.279Z [err] npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
2021-05-26T06:43:18.279Z [err] npm ERR!
2021-05-26T06:43:18.280Z [err] gyp ERR! find VS checking VS2019 (16.9.31313.79) found at:
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS - missing any VC++ toolset
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
2021-05-26T06:43:18.280Z [err] npm ERR!
2021-05-26T06:43:18.280Z [err] gyp ERR! find VS looking for Visual Studio 2015
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS - not found
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS **************************************************************
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
2021-05-26T06:43:18.280Z [err] npm ERR!
2021-05-26T06:43:18.280Z [err] gyp ERR! find VS including the "Desktop development with C++" workload.
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS For more information consult the documentation at:
2021-05-26T06:43:18.280Z [err] npm ERR!
2021-05-26T06:43:18.280Z [err] gyp ERR! find VS GitHub - nodejs/node-gyp: Node.js native addon build tool
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! find VS **************************************************************
2021-05-26T06:43:18.280Z [err] npm ERR!
2021-05-26T06:43:18.280Z [err] gyp ERR! find VS
2021-05-26T06:43:18.280Z [err] npm ERR! gyp ERR! configure error
2021-05-26T06:43:18.280Z [err] npm ERR!
2021-05-26T06:43:18.281Z [err] gyp ERR! stack Error: Could not find any Visual Studio installation to use
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
2021-05-26T06:43:18.281Z [err] npm ERR!
2021-05-26T06:43:18.281Z [err] gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
2021-05-26T06:43:18.281Z [err] npm ERR!
2021-05-26T06:43:18.281Z [err] gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
2021-05-26T06:43:18.281Z [err] npm
2021-05-26T06:43:18.281Z [err] ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:333:5)
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)
2021-05-26T06:43:18.281Z [err] npm
2021-05-26T06:43:18.281Z [err] ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! System Windows_NT 10.0.18363
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
2021-05-26T06:43:18.281Z [err] npm ERR!
2021-05-26T06:43:18.281Z [err] gyp ERR! cwd C:\Users\Administrator.node-red\node_modules@serialport\bindings
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! node -v v16.2.0
2021-05-26T06:43:18.281Z [err] npm
2021-05-26T06:43:18.281Z [err] ERR! gyp ERR! node-gyp -v v7.1.2
2021-05-26T06:43:18.281Z [err] npm ERR! gyp ERR! not ok
2021-05-26T06:43:18.325Z [err]
2021-05-26T06:43:18.325Z [err] npm ERR! A complete log of this run can be found in:
2021-05-26T06:43:18.325Z [err] npm ERR! C:\Users\Administrator\AppData\Local\npm-cache_logs\2021-05-26T06_43_18_346Z-debug.log
2021-05-26T06:43:18.358Z rc=1


2021-05-26T06:54:32.286Z Install : node-red-node-arduino 0.3.1

2021-05-26T06:54:32.294Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-arduino@0.3.1
2021-05-26T06:54:40.574Z [err] npm
2021-05-26T06:54:40.574Z [err] ERR! code 1
2021-05-26T06:54:40.575Z [err] npm ERR! path
2021-05-26T06:54:40.575Z [err] C:\Users\Administrator.node-red\node_modules@serialport\bindings
2021-05-26T06:54:40.577Z [err] npm
2021-05-26T06:54:40.577Z [err] ERR! command failed
2021-05-26T06:54:40.577Z [err] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-05-26T06:54:40.578Z [err] npm ERR! gyp info it worked if it ends with ok
2021-05-26T06:54:40.578Z [err] npm ERR!
2021-05-26T06:54:40.578Z [err] gyp info using node-gyp@7.1.2
2021-05-26T06:54:40.578Z [err] npm ERR! gyp info using node@16.2.0 | win32 | x64
2021-05-26T06:54:40.578Z [err] npm
2021-05-26T06:54:40.578Z [err] ERR! gyp info find Python using Python version 3.9.5 found at "C:\Python39\python.exe"
2021-05-26T06:54:40.578Z [err] npm ERR!
2021-05-26T06:54:40.578Z [err] gyp ERR! find VS
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
2021-05-26T06:54:40.578Z [err] npm ERR!
2021-05-26T06:54:40.578Z [err] gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS checking VS2019 (16.9.31313.79) found at:
2021-05-26T06:54:40.578Z [err] npm
2021-05-26T06:54:40.578Z [err] ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS - missing any VC++ toolset
2021-05-26T06:54:40.578Z [err] npm ERR!
2021-05-26T06:54:40.578Z [err] gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS looking for Visual Studio 2015
2021-05-26T06:54:40.578Z [err] npm
2021-05-26T06:54:40.578Z [err] ERR! gyp ERR! find VS - not found
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
2021-05-26T06:54:40.578Z [err] npm
2021-05-26T06:54:40.578Z [err] ERR! gyp ERR! find VS
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS **************************************************************
2021-05-26T06:54:40.578Z [err] npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
2021-05-26T06:54:40.578Z [err] npm ERR!
2021-05-26T06:54:40.579Z [err] gyp ERR! find VS including the "Desktop development with C++" workload.
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! find VS For more information consult the documentation at:
2021-05-26T06:54:40.579Z [err] npm
2021-05-26T06:54:40.579Z [err] ERR! gyp ERR! find VS GitHub - nodejs/node-gyp: Node.js native addon build tool
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! find VS **************************************************************
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! find VS
2021-05-26T06:54:40.579Z [err] npm ERR!
2021-05-26T06:54:40.579Z [err] gyp ERR! configure error
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
2021-05-26T06:54:40.579Z [err] npm
2021-05-26T06:54:40.579Z [err] ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
2021-05-26T06:54:40.579Z [err] npm
2021-05-26T06:54:40.579Z [err] ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
2021-05-26T06:54:40.579Z [err] npm ERR!
2021-05-26T06:54:40.579Z [err] gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
2021-05-26T06:54:40.579Z [err] npm ERR!
2021-05-26T06:54:40.579Z [err] gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
2021-05-26T06:54:40.579Z [err] npm
2021-05-26T06:54:40.579Z [err] ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:333:5)
2021-05-26T06:54:40.579Z [err] npm ERR!
2021-05-26T06:54:40.579Z [err] gyp ERR! stack at ChildProcess.emit (node:events:365:28)
2021-05-26T06:54:40.579Z [err] npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
2021-05-26T06:54:40.579Z [err] npm
2021-05-26T06:54:40.579Z [err] ERR! gyp ERR! System Windows_NT 10.0.18363
2021-05-26T06:54:40.579Z [err] npm ERR!
2021-05-26T06:54:40.580Z [err] gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
2021-05-26T06:54:40.580Z [err] npm ERR! gyp ERR! cwd C:\Users\Administrator.node-red\node_modules@serialport\bindings
2021-05-26T06:54:40.580Z [err] npm ERR!
2021-05-26T06:54:40.580Z [err] gyp ERR! node -v v16.2.0
2021-05-26T06:54:40.580Z [err] npm ERR! gyp ERR! node-gyp -v v7.1.2
2021-05-26T06:54:40.580Z [err] npm
2021-05-26T06:54:40.580Z [err] ERR! gyp ERR! not ok
2021-05-26T06:54:40.623Z [err]
2021-05-26T06:54:40.623Z [err] npm ERR! A complete log of this run can be found in:
2021-05-26T06:54:40.623Z [err] npm ERR!
2021-05-26T06:54:40.623Z [err] C:\Users\Administrator\AppData\Local\npm-cache_logs\2021-05-26T06_54_40_576Z-debug.log
2021-05-26T06:54:40.650Z rc=1

The error message includes instructions on how to solve this problem:

In order to open the serial port used to talk to the arduino the node needs to build a native code component, to do this it needs MS Visual Studio installed on the machine and provides a link to the instructions

Hi
To add to what @hardillb is saying, you need to install build tools first. From an elevated command prompt...

npm install --global windows-build-tools

... Then try installing the modbus node again.

NOTE: it can take quite some time to install build tools and might appear frozen, please wait it out.

Thank you, will try this

Ran it as administrator in Powershell and got the following:

PS C:\WINDOWS\system32> npm install --global windows-build-tools
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request · GitHub
[ ] / reify:resolve: timing

Thats fine. they are just warnings.

Did you leave it to complete? It has to download a significant amount and may take a long time if you don't have fast broadand.

Left it for like 2-3 hours and nothing more came up, but I have to admit that it did not look like it was finished.

Leave it till it finishes.

It isn't finished till it comes back to the command prompt.
Please don't post screenshots unless necessary, copy/paste text instead.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.