Serial Port add failure

Trying to add node red serial port, tired multiple times, closing and reopening node-red, no luck.

Log -

-----------------------------------------------------------
2021-06-02T13:23:15.186Z Install : node-red-node-serialport 0.14.0

2021-06-02T13:23:15.197Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-serialport@0.14.0
2021-06-02T13:23:31.941Z [out] 
2021-06-02T13:23:31.941Z [out] > @serialport/bindings@9.1.0 install C:\Users\user\.node-red\node_modules\node-red-node-serialport\node_modules\@serialport\bindings
2021-06-02T13:23:31.941Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-06-02T13:23:31.941Z [out] 
2021-06-02T13:23:34.023Z [err] prebuild-install
2021-06-02T13:23:34.023Z [err]  WARN install No prebuilt binaries found (target=14.17.0 runtime=node arch=ia32 libc= platform=win32)
2021-06-02T13:23:34.058Z [out] 
2021-06-02T13:23:34.058Z [out] C:\Users\user\.node-red\node_modules\node-red-node-serialport\node_modules\@serialport\bindings>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
2021-06-02T13:23:49.664Z [err] gyp
2021-06-02T13:23:49.664Z [err]  ERR! find VS 
2021-06-02T13:23:49.664Z [err] gyp ERR! find VS msvs_version not set from command line or npm config
2021-06-02T13:23:49.664Z [err] gyp ERR! 
2021-06-02T13:23:49.665Z [err] find VS VCINSTALLDIR not set, not running in VS Command Prompt
2021-06-02T13:23:49.665Z [err] gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
2021-06-02T13:23:49.665Z [err] gyp 
2021-06-02T13:23:49.665Z [err] ERR! find VS looking for Visual Studio 2015
2021-06-02T13:23:49.665Z [err] gyp ERR! find VS - not found
2021-06-02T13:23:49.665Z [err] gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
2021-06-02T13:23:49.665Z [err] gyp ERR!
2021-06-02T13:23:49.665Z [err]  find VS 
2021-06-02T13:23:49.665Z [err] gyp ERR! find VS **************************************************************
2021-06-02T13:23:49.665Z [err] gyp 
2021-06-02T13:23:49.665Z [err] ERR! find VS You need to install the latest version of Visual Studio
2021-06-02T13:23:49.665Z [err] gyp ERR! find VS including the "Desktop development with C++" workload.
2021-06-02T13:23:49.665Z [err] gyp
2021-06-02T13:23:49.666Z [err]  ERR! find VS For more information consult the documentation at:
2021-06-02T13:23:49.666Z [err] gyp ERR!
2021-06-02T13:23:49.666Z [err]  find VS https://github.com/nodejs/node-gyp#on-windows
2021-06-02T13:23:49.666Z [err] gyp ERR! 
2021-06-02T13:23:49.666Z [err] find VS **************************************************************
2021-06-02T13:23:49.666Z [err] gyp ERR! 
2021-06-02T13:23:49.666Z [err] find VS 
2021-06-02T13:23:49.667Z [err] gyp
2021-06-02T13:23:49.668Z [err]  ERR! configure error 
2021-06-02T13:23:49.668Z [err] gyp ERR! stack Error: Could not find any Visual Studio installation to use
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at ChildProcess.exithandler (child_process.js:326:5)
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at ChildProcess.emit (events.js:376:20)
2021-06-02T13:23:49.668Z [err] gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
2021-06-02T13:23:49.669Z [err] gyp ERR! System
2021-06-02T13:23:49.669Z [err]  Windows_NT 10.0.19043
2021-06-02T13:23:49.669Z [err] gyp 
2021-06-02T13:23:49.669Z [err] ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
2021-06-02T13:23:49.669Z [err] gyp 
2021-06-02T13:23:49.669Z [err] ERR! cwd C:\Users\user\.node-red\node_modules\node-red-node-serialport\node_modules\@serialport\bindings
2021-06-02T13:23:49.669Z [err] gyp
2021-06-02T13:23:49.669Z [err]  ERR! node -v v14.17.0
2021-06-02T13:23:49.669Z [err] gyp
2021-06-02T13:23:49.669Z [err]  ERR! node-gyp -v v5.1.0
2021-06-02T13:23:49.669Z [err] gyp 
2021-06-02T13:23:49.669Z [err] ERR! not ok 
2021-06-02T13:23:50.011Z [err] npm
2021-06-02T13:23:50.012Z [err]  ERR! code ELIFECYCLE
2021-06-02T13:23:50.012Z [err] npm 
2021-06-02T13:23:50.012Z [err] ERR! errno 1
2021-06-02T13:23:50.022Z [err] npm ERR!
2021-06-02T13:23:50.022Z [err]  @serialport/bindings@9.1.0 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`
2021-06-02T13:23:50.022Z [err] npm ERR! Exit status 1
2021-06-02T13:23:50.022Z [err] npm ERR! 
2021-06-02T13:23:50.022Z [err] npm ERR!
2021-06-02T13:23:50.023Z [err]  Failed at the @serialport/bindings@9.1.0 install script.
2021-06-02T13:23:50.023Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-06-02T13:23:50.036Z [err] 
2021-06-02T13:23:50.037Z [err] npm ERR! A complete log of this run can be found in:
2021-06-02T13:23:50.037Z [err] npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-06-02T13_23_50_027Z-debug.log
2021-06-02T13:23:50.054Z rc=1

Regards, Dana

Hi @danadak, welcome to the forum.

The log contains the information you need:

2021-06-02T13:23:49.665Z [err] gyp ERR! find VS **************************************************************
2021-06-02T13:23:49.665Z [err] gyp 
2021-06-02T13:23:49.665Z [err] ERR! find VS You need to install the latest version of Visual Studio
2021-06-02T13:23:49.665Z [err] gyp ERR! find VS including the "Desktop development with C++" workload.
2021-06-02T13:23:49.665Z [err] gyp
2021-06-02T13:23:49.666Z [err]  ERR! find VS For more information consult the documentation at:
2021-06-02T13:23:49.666Z [err] gyp ERR!
2021-06-02T13:23:49.666Z [err]  find VS https://github.com/nodejs/node-gyp#on-windows
2021-06-02T13:23:49.666Z [err] gyp ERR! 
2021-06-02T13:23:49.666Z [err] find VS ***

I think the section in the docs on installing the windows build tools should do it for you. Running on Windows : Node-RED

1 Like

Thanks Colin, install of tools fixed problem.

Regards, Dana.

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