# Serial Port add failure

**URL:** <https://discourse.nodered.org/t/serial-port-add-failure/46597>\
**Category:** General\
**Created:** [2 June 2021 13:30 UTC](https://discourse.nodered.org/t/serial-port-add-failure/46597 "2021-06-02T13:30:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danadak](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@danadak](https://discourse.nodered.org/u/danadak)\
**Post date:** [2 June 2021 13:30 UTC](https://discourse.nodered.org/t/serial-port-add-failure/46597/1 "2021-06-02T13:30:49Z")

</div>

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

Log -

```auto
-----------------------------------------------------------
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

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 June 2021 13:34 UTC](https://discourse.nodered.org/t/serial-port-add-failure/46597/2 "2021-06-02T13:34:58Z")

</div>

Hi @danadak, welcome to the forum.

The log contains the information you need:

```auto
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 ***

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 June 2021 14:07 UTC](https://discourse.nodered.org/t/serial-port-add-failure/46597/3 "2021-06-02T14:07:02Z")

</div>

I think the section in the docs on installing the windows build tools should do it for you. [Running on Windows : Node-RED](https://nodered.org/docs/getting-started/windows#installing-nodejs-windows-build-tools)

---

<div class="post-metadata">

**Author:** ![danadak](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@danadak](https://discourse.nodered.org/u/danadak)\
**Post date:** [2 June 2021 14:39 UTC](https://discourse.nodered.org/t/serial-port-add-failure/46597/4 "2021-06-02T14:39:21Z")

</div>

Thanks Colin, install of tools fixed problem.

Regards, Dana.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 August 2021 14:40 UTC](https://discourse.nodered.org/t/serial-port-add-failure/46597/5 "2021-08-01T14:40:00Z")

</div>

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