Node-red-node-arduino installation failure

Greetings Everybody,

I have been trying to install node-red-node-arduino for the past few weeks but can't seem to figure it out. I browsed the web (and forum) for some solutions and have tried all but to no avail. I have attached some of the solutions I went through for reference.

Node-Red Version: 2.1.6
Node Version: 16.3.0
Npm Version: 8.3.2

Cleared the cache & deleted the @serialport folder (then did npm install there):

Installed the C++ build tools:

Updated visual studio:

Error Message:

177 verbose pkgid @serialport/bindings@8.0.8
178 verbose cwd C:\Users\a0540\.node-red
179 verbose Windows_NT 10.0.19044
180 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\a0540\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-red-node-arduino"
181 verbose node v16.3.0
182 verbose npm  v8.1.3
183 error code 1
184 error path C:\Users\a0540\.node-red\node_modules\firmata\node_modules\@serialport\bindings
185 error command failed
186 error command C:\Windows\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
187 error Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
187 error   serialport.cpp
187 error C:\Users\a0540\AppData\Local\node-gyp\Cache\16.3.0\include\node\node.h(63,10): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [C:\Users\a0540\.node-red\node_modules\firmata\node_modules\@serialport\bindings\build\bindings.vcxproj]
188 error gyp info it worked if it ends with ok
188 error gyp info using node-gyp@8.4.1
188 error gyp info using node@16.3.0 | win32 | x64
188 error gyp info find Python using Python version 3.9.6 found at "C:\Users\a0540\AppData\Local\Programs\Python\Python39\python.exe"
188 error gyp info find VS using VS2019 (16.11.32106.194) found at:
188 error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
188 error gyp info find VS run with --verbose for detailed information
188 error gyp info spawn C:\Users\a0540\AppData\Local\Programs\Python\Python39\python.exe
188 error gyp info spawn args [
188 error gyp info spawn args   'C:\\Users\\a0540\\.node-red\\node_modules\\node-gyp\\gyp\\gyp_main.py',
188 error gyp info spawn args   'binding.gyp',
188 error gyp info spawn args   '-f',
188 error gyp info spawn args   'msvs',
188 error gyp info spawn args   '-I',
188 error gyp info spawn args   'C:\\Users\\a0540\\.node-red\\node_modules\\firmata\\node_modules\\@serialport\\bindings\\build\\config.gypi',
188 error gyp info spawn args   '-I',
188 error gyp info spawn args   'C:\\Users\\a0540\\.node-red\\node_modules\\node-gyp\\addon.gypi',
188 error gyp info spawn args   '-I',
188 error gyp info spawn args   'C:\\Users\\a0540\\AppData\\Local\\node-gyp\\Cache\\16.3.0\\include\\node\\common.gypi',
188 error gyp info spawn args   '-Dlibrary=shared_library',
188 error gyp info spawn args   '-Dvisibility=default',
188 error gyp info spawn args   '-Dnode_root_dir=C:\\Users\\a0540\\AppData\\Local\\node-gyp\\Cache\\16.3.0',
188 error gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\a0540\\.node-red\\node_modules\\node-gyp',
188 error gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\a0540\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.3.0\\\\<(target_arch)\\\\node.lib',
188 error gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\a0540\\.node-red\\node_modules\\firmata\\node_modules\\@serialport\\bindings',
188 error gyp info spawn args   '-Dnode_engine=v8',
188 error gyp info spawn args   '--depth=.',
188 error gyp info spawn args   '--no-parallel',
188 error gyp info spawn args   '--generator-output',
188 error gyp info spawn args   'C:\\Users\\a0540\\.node-red\\node_modules\\firmata\\node_modules\\@serialport\\bindings\\build',
188 error gyp info spawn args   '-Goutput_dir=.'
188 error gyp info spawn args ]
188 error gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
188 error gyp info spawn args [
188 error gyp info spawn args   'build/binding.sln',
188 error gyp info spawn args   '/clp:Verbosity=minimal',
188 error gyp info spawn args   '/nologo',
188 error gyp info spawn args   '/p:Configuration=Release;Platform=x64'
188 error gyp info spawn args ]
188 error gyp ERR! build error
188 error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
188 error gyp ERR! stack     at ChildProcess.onExit (C:\Users\a0540\.node-red\node_modules\node-gyp\lib\build.js:194:23)
188 error gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
188 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
188 error gyp ERR! System Windows_NT 10.0.19044
188 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\a0540\\.node-red\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
188 error gyp ERR! cwd C:\Users\a0540\.node-red\node_modules\firmata\node_modules\@serialport\bindings
188 error gyp ERR! node -v v16.3.0
188 error gyp ERR! node-gyp -v v8.4.1
188 error gyp ERR! not ok
189 verbose exit 1

Any guidance would be greatly appreciated!

This is the problem. Look for that.

This seems best match: fatal error C1083: Cannot open include file: 'v8.h': No such file or directory · Issue #2482 · nodejs/node-gyp · GitHub

Question - did you recently upgrade nodejs?

Indeed. That was the issue, this solution helped alot:

Thanks so much for all the help.
Much appreciate it.

Note: No, I had not updated my Nodejs recently.

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