# Attempting to Install Serial Port Node on Windows 10 fails

**URL:** <https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271>\
**Category:** General\
**Created:** [6 May 2021 12:30 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271 "2021-05-06T12:30:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirkvermaak](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dirkvermaak/32/41364_2.png) [@dirkvermaak](https://discourse.nodered.org/u/dirkvermaak)\
**Post date:** [6 May 2021 12:30 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271/1 "2021-05-06T12:30:17Z")

</div>

Hello,

I am attempting to install node-red-node-serialport 0.14.0 on a fully up to date Windows 10 (64-bit) professional PC. I installed Node-Red yesterday and it is running fine. However the serial port installation fails. I have looked at the log but I admit to not understanding it. As a new user I can't upload the file so have added it here. Sorry .

If possible could someone point me in the right direction or let me know if this just doesn't run on windows.

Many Thanks.

2021-05-06T08:57:56.648Z Install : node-red-node-serialport 0.14.0

2021-05-06T08:57:56.968Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-serialport@0.14.0  
2021-05-06T08:58:02.363Z [err] npm  
2021-05-06T08:58:02.363Z [err] ERR! code 1  
2021-05-06T08:58:02.363Z [err] npm ERR! path C:\Users\Dirk.node-red\node\_modules@serialport\bindings  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! command failed  
2021-05-06T08:58:02.366Z [err] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild  
2021-05-06T08:58:02.366Z [err] npm ERR! prebuild-install WARN install No prebuilt binaries found (target=16.1.0 runtime=node arch=x64 libc= platform=win32)  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.366Z [err] gyp info it worked if it ends with ok  
2021-05-06T08:58:02.366Z [err] npm ERR! gyp info using node-gyp@7.1.2  
2021-05-06T08:58:02.366Z [err] npm ERR! gyp info using node@16.1.0 | win32 | x64  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! gyp info find Python using Python version 3.7.9 found at "C:\Users\Dirk\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7\_qbz5n2kfra8p0\python.exe"  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.366Z [err] gyp info find VS using VS2019 (16.9.31205.134) found at:  
2021-05-06T08:58:02.366Z [err] npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! gyp info find VS run with --verbose for detailed information  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.366Z [err] (node:17856) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.  
2021-05-06T08:58:02.366Z [err] npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)  
2021-05-06T08:58:02.366Z [err] npm ERR! gyp info spawn C:\Users\Dirk\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7\_qbz5n2kfra8p0\python.exe  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! gyp info spawn args [  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! gyp info spawn args 'C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\gyp\gyp\_main.py',  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! gyp info spawn args 'binding.gyp',  
2021-05-06T08:58:02.366Z [err] npm  
2021-05-06T08:58:02.366Z [err] ERR! gyp info spawn args '-f',  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.366Z [err] gyp info spawn args 'msvs',  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.366Z [err] gyp info spawn args '-I',  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.366Z [err] gyp info spawn args 'C:\Users\Dirk\.node-red\node\_modules\@serialport\bindings\build\config.gypi',  
2021-05-06T08:58:02.366Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args '-I',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args 'C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\addon.gypi',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args '-I',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args 'C:\Users\Dirk\AppData\Local\node-gyp\Cache\16.1.0\common.gypi',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args '-Dlibrary=shared\_library',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args '-Dvisibility=default',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args '-Dnode\_root\_dir=C:\Users\Dirk\AppData\Local\node-gyp\Cache\16.1.0',  
2021-05-06T08:58:02.367Z [err] npm ERR! gyp info spawn args '-Dnode\_gyp\_dir=C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args '-Dnode\_lib\_file=C:\\Users\\Dirk\\AppData\\Local\\node-gyp\\Cache\\16.1.0\\\<(target\_arch)\\node.lib',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args '-Dmodule\_root\_dir=C:\Users\Dirk\.node-red\node\_modules\@serialport\bindings',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args '-Dnode\_engine=v8',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args '--depth=.',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args '--no-parallel',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args '--generator-output',  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp info spawn args 'C:\Users\Dirk\.node-red\node\_modules\@serialport\bindings\build',  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args '-Goutput\_dir=.'  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp info spawn args ]  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp: C:\Users\Dirk\AppData\Local\node-gyp\Cache\16.1.0\common.gypi not found (cwd: C:\Users\Dirk.node-red\node\_modules@serialport\bindings) while reading includes of binding.gyp while trying to load binding.gyp  
2021-05-06T08:58:02.367Z [err] npm ERR! gyp ERR! configure error  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp ERR! stack Error: `gyp` failed with exit code: 1  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\configure.js:351:16)  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp ERR! stack at ChildProcess.emit (node:events:365:28)  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp ERR! stack at Process.ChildProcess.\_handle.onexit (node:internal/child\_process:290:12)  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp ERR! System Windows\_NT 10.0.19042  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [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-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp ERR! cwd C:\Users\Dirk.node-red\node\_modules@serialport\bindings  
2021-05-06T08:58:02.367Z [err] npm ERR!  
2021-05-06T08:58:02.367Z [err] gyp ERR! node -v v16.1.0  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.367Z [err] ERR! gyp ERR! node-gyp -v v7.1.2  
2021-05-06T08:58:02.367Z [err] npm  
2021-05-06T08:58:02.368Z [err] ERR! gyp ERR! not ok  
2021-05-06T08:58:02.377Z [err]  
2021-05-06T08:58:02.377Z [err] npm ERR! A complete log of this run can be found in:  
2021-05-06T08:58:02.377Z [err] npm ERR! C:\Users\Dirk\AppData\Local\npm-cache\_logs\2021-05-06T08\_58\_02\_369Z-debug.log  
2021-05-06T08:58:02.392Z rc=1

---

<div class="post-metadata">

**Author:** ![droberts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/droberts/32/40295_2.png) [@droberts](https://discourse.nodered.org/u/droberts)\
**Post date:** [6 May 2021 13:02 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271/2 "2021-05-06T13:02:02Z")

</div>

> [@dirkvermaak](#):
>
> node-red-node-serialport

Have you installed the build tools for Windows as per this section of the Windows install guide? [Running on Windows : Node-RED](https://nodered.org/docs/getting-started/windows#installing-nodejs-windows-build-tools)

Namely `npm install --global --production windows-build-tools` ?

---

<div class="post-metadata">

**Author:** ![dirkvermaak](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dirkvermaak/32/41364_2.png) [@dirkvermaak](https://discourse.nodered.org/u/dirkvermaak)\
**Post date:** [6 May 2021 13:10 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271/3 "2021-05-06T13:10:37Z")

</div>

Thanks for responding.

> [@droberts](#):
>
> npm install --global --production windows-build-tools

Well I have tried. However, it gives me two warnings and appears to hang. I have waited for 30 minutes and it just doesn't do anything. It is in powershell running as an administrator.

npm install --global --production 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 [https://github.com/request/request/issues/3142](https://github.com/request/request/issues/3142)  
[] / reify:resolve: timing re

---

<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:** [6 May 2021 13:10 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271/4 "2021-05-06T13:10:54Z")

</div>

> [@dirkvermaak](#):
>
> 2021-05-06T08:58:02.366Z [err] npm ERR! gyp info using node@16.1.0 | win32 | x64

Also, nodejs 16.x is not yet supported, you should remove that and install 12 or14, then re-install the windows tools and node-red. It is all detailed in the [install guide for Windows](https://nodered.org/docs/getting-started/windows).

---

<div class="post-metadata">

**Author:** ![dirkvermaak](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dirkvermaak/32/41364_2.png) [@dirkvermaak](https://discourse.nodered.org/u/dirkvermaak)\
**Post date:** [6 May 2021 13:43 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271/5 "2021-05-06T13:43:16Z")

</div>

Thank you. It all came down to the nodejs being version 16. I reinstalled this and also checked the box so that all the tools would install at once and then it all works.

Thanks for the help. I misread the windows installation page 'Download the latest 12.x LTS version'. I think my brain focused on the word 'Latest' and so that's what I did.

Once again, thanks for the prompt and pleasant help.

---

<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:** [5 July 2021 13:43 UTC](https://discourse.nodered.org/t/attempting-to-install-serial-port-node-on-windows-10-fails/45271/6 "2021-07-05T13:43:26Z")

</div>

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