Loading ncd-red-wireless on Windows

Hi -

  1. I'm new to node-red
  2. I'm new to the ncd.io hardware environment
  3. I have NO idea about install loaders or what makes them fail.

I'm trying to install the ncd-red-wireless module (V1.5.31) and the load is failing.

Environment:
Windows 10 Pro Version 21H1 (OS Build 19043.906) 64bit
node.js Version 14.16.1
npm Version 6.14.12
Visual Studio V19

I get the following log :


2021-04-09T06:16:32.330Z Install : ncd-red-wireless 1.5.31

2021-04-09T06:16:32.358Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production ncd-red-wireless@1.5.31
2021-04-09T06:16:45.449Z [out]
2021-04-09T06:16:45.449Z [out] > @serialport/bindings@2.0.8 install C:\Users\bahea.node-red\node_modules@serialport\bindings
2021-04-09T06:16:45.449Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-04-09T06:16:45.449Z [out]
2021-04-09T06:16:46.371Z [err] prebuild-install
2021-04-09T06:16:46.371Z [err] WARN install No prebuilt binaries found (target=14.16.1 runtime=node arch=x64 libc= platform=win32)
2021-04-09T06:16:46.392Z [out]
2021-04-09T06:16:46.392Z [out] C:\Users\bahea.node-red\node_modules@serialport\bindings>
2021-04-09T06:16:46.394Z [out] if not defined npm_config_node_gyp (node "C:\Program Files\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\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
2021-04-09T06:16:48.316Z [out] Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
2021-04-09T06:16:48.928Z [out] serialport.cpp
2021-04-09T06:16:48.928Z [out] serialport_win.cpp
2021-04-09T06:16:48.928Z [out] win_delay_load_hook.cc
2021-04-09T06:16:49.873Z [out] C:\Users\bahea.node-red\node_modules@serialport\bindings\src\serialport.cpp(329,96): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\bahea.node-red\node_modules@serialport\bindings\build\bindings.vcxproj]
2021-04-09T06:16:49.873Z [out] C:\Users\bahea.node-red\node_modules@serialport\bindings\src\serialport.cpp(330,96): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\bahea.node-red\node_modules@serialport\bindings\build\bindings.vcxproj]
2021-04-09T06:16:49.873Z [out] C:\Users\bahea.node-red\node_modules@serialport\bindings\src\serialport.cpp(331,96): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\bahea.node-red\node_modules@serialport\bindings\build\bindings.vcxproj]
2021-04-09T06:16:49.873Z [out] C:\Users\bahea.node-red\node_modules@serialport\bindings\src\serialport.cpp(378,106): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\bahea.node-red\node_modules@serialport\bindings\build\bindings.vcxproj]
2021-04-09T06:16:50.375Z [err] gyp
2021-04-09T06:16:50.375Z [err] ERR! build error
2021-04-09T06:16:50.376Z [err] gyp ERR!
2021-04-09T06:16:50.376Z [err] stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
2021-04-09T06:16:50.376Z [err] gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
2021-04-09T06:16:50.376Z [err] gyp ERR! stack
2021-04-09T06:16:50.376Z [err] at ChildProcess.emit (events.js:315:20)
2021-04-09T06:16:50.376Z [err] gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
2021-04-09T06:16:50.376Z [err] gyp ERR! System Windows_NT 10.0.19043
2021-04-09T06:16:50.376Z [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-04-09T06:16:50.376Z [err] gyp
2021-04-09T06:16:50.376Z [err] ERR! cwd C:\Users\bahea.node-red\node_modules@serialport\bindings
2021-04-09T06:16:50.376Z [err] gyp ERR! node -v v14.16.1
2021-04-09T06:16:50.376Z [err] gyp ERR! node-gyp -v v5.1.0
2021-04-09T06:16:50.376Z [err] gyp ERR!
2021-04-09T06:16:50.376Z [err] not ok
2021-04-09T06:16:50.580Z [err] npm ERR!
2021-04-09T06:16:50.580Z [err] code ELIFECYCLE
2021-04-09T06:16:50.580Z [err] npm
2021-04-09T06:16:50.580Z [err] ERR! errno 1
2021-04-09T06:16:50.584Z [err] npm ERR!
2021-04-09T06:16:50.584Z [err] @serialport/bindings@2.0.8 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2021-04-09T06:16:50.584Z [err] npm ERR! Exit status 1
2021-04-09T06:16:50.584Z [err] npm ERR!
2021-04-09T06:16:50.584Z [err] npm ERR!
2021-04-09T06:16:50.585Z [err] Failed at the @serialport/bindings@2.0.8 install script.
2021-04-09T06:16:50.585Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-04-09T06:16:50.596Z [err]
2021-04-09T06:16:50.596Z [err] npm ERR! A complete log of this run can be found in:
2021-04-09T06:16:50.596Z [err] npm ERR! C:\Users\bahea\AppData\Roaming\npm-cache_logs\2021-04-09T06_16_50_587Z-debug.log
2021-04-09T06:16:50.625Z rc=1


Can anyone give me an idea of how to get this to bind.

Regards,

Ozchemist.

I see you have VS 2019 installed but I am not 100% certain that is enough for when a build operation is needed in node.

Did you install windows-build-tools?

Try (from an elevated command prompt) npm install --global windows-build-tools then reboot then try again.

NOTE: it can seem to stall and does take quite some time to complete - wait it out.

Hi Steve,

I had installed the build tools as part of the original download - but I'm wondering if the system may have gotten "confused".

So, I started with a "clean machine" (jmh_i).

Environment :
Microsoft Windows 10 Home Version|10.0.19041 Build 19041|
node.js Version 14.16.1
node-gyp V8.0.0 (or maybe 5.1.0 - see below)
npm Version 6.14.12
Python is loaded - both Ver 3.9 and Ver 2.7
Visual Studio V19
{vsconfig }
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.NetCore.Component.Runtime.5.0",
"Microsoft.NetCore.Component.Runtime.3.1",
"Microsoft.NetCore.Component.SDK",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.Component.FSharp",
"Microsoft.ComponentGroup.ClickOnce.Publish",
"Microsoft.NetCore.Component.DevelopmentTools",
"Microsoft.VisualStudio.Component.FSharp.WebTemplates",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
"Microsoft.VisualStudio.Component.DockerTools",
"Microsoft.NetCore.Component.Web",
"Microsoft.Net.Component.4.8.SDK",
"Microsoft.Net.Component.4.7.2.TargetingPack",
"Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
"Microsoft.VisualStudio.Component.TypeScript.4.1",
"Microsoft.VisualStudio.Component.JavaScript.TypeScript",
"Microsoft.VisualStudio.Component.JavaScript.Diagnostics",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.TextTemplating",
"Component.Microsoft.VisualStudio.RazorExtension",
"Microsoft.VisualStudio.Component.IISExpress",
"Microsoft.VisualStudio.Component.SQL.ADAL",
"Microsoft.VisualStudio.Component.SQL.LocalDB.Runtime",
"Microsoft.VisualStudio.Component.Common.Azure.Tools",
"Microsoft.VisualStudio.Component.SQL.CLR",
"Microsoft.VisualStudio.Component.MSODBC.SQL",
"Microsoft.VisualStudio.Component.MSSQL.CMDLnUtils",
"Microsoft.VisualStudio.Component.ManagedDesktop.Core",
"Microsoft.Net.Component.4.5.2.TargetingPack",
"Microsoft.Net.Component.4.5.TargetingPack",
"Microsoft.VisualStudio.Component.SQL.SSDT",
"Microsoft.VisualStudio.Component.SQL.DataSources",
"Component.Microsoft.Web.LibraryManager",
"Component.Microsoft.WebTools.BrowserLink.WebLivePreview",
"Microsoft.VisualStudio.ComponentGroup.Web",
"Microsoft.VisualStudio.Component.Web",
"Microsoft.VisualStudio.ComponentGroup.Web.Client",
"Microsoft.Net.Component.4.TargetingPack",
"Microsoft.Net.Component.4.5.1.TargetingPack",
"Microsoft.Net.Component.4.6.TargetingPack",
"Microsoft.Net.ComponentGroup.TargetingPacks.Common",
"Microsoft.Net.Core.Component.SDK.2.1",
"Component.Microsoft.VisualStudio.Web.AzureFunctions",
"Microsoft.VisualStudio.ComponentGroup.AzureFunctions",
"Microsoft.VisualStudio.Component.Azure.Compute.Emulator",
"Microsoft.VisualStudio.Component.Azure.Storage.Emulator",
"Microsoft.VisualStudio.Component.Azure.ClientLibs",
"Microsoft.VisualStudio.Component.Azure.AuthoringTools",
"Microsoft.VisualStudio.Component.CloudExplorer",
"Microsoft.VisualStudio.ComponentGroup.Web.CloudTools",
"Microsoft.VisualStudio.Component.DiagnosticTools",
"Microsoft.VisualStudio.Component.EntityFramework",
"Microsoft.VisualStudio.Component.AspNet45",
"Microsoft.VisualStudio.Component.AppInsights.Tools",
"Microsoft.VisualStudio.Component.WebDeploy",
"Microsoft.VisualStudio.Component.Debugger.JustInTime",
"Component.Microsoft.VisualStudio.LiveShare",
"Microsoft.VisualStudio.Component.WslDebugging",
"Microsoft.VisualStudio.Component.IntelliCode",
"Microsoft.VisualStudio.Workload.NetWeb",
"Microsoft.Component.PythonTools",
"Microsoft.Component.PythonTools.Miniconda",
"Microsoft.Component.PythonTools.Web",
"Microsoft.VisualStudio.Component.VC.CoreIde",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Graphics.Tools",
"Microsoft.VisualStudio.Component.VC.DiagnosticTools",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Component.CPython3.x64",
"Microsoft.VisualStudio.Workload.Python",
"Microsoft.VisualStudio.Component.Node.Tools",
"Microsoft.VisualStudio.Workload.Node",
"Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites",
"Microsoft.ComponentGroup.Blend",
"Microsoft.VisualStudio.Component.DotNetModelBuilder",
"Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Component.VC.Redist.14.Latest",
"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake",
"Microsoft.VisualStudio.Component.VC.CMake.Project",
"Microsoft.VisualStudio.Component.VC.ATL",
"Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest",
"Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest",
"Microsoft.VisualStudio.Component.VC.ASAN",
"Microsoft.Component.VC.Runtime.UCRTSDK",
"Microsoft.VisualStudio.Component.VC.140",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.Component.NetFX.Native",
"Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard",
"Microsoft.VisualStudio.Component.Graphics",
"Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin",
"Microsoft.VisualStudio.ComponentGroup.UWP.Support",
"Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb",
"Microsoft.VisualStudio.Workload.Universal",
"Microsoft.VisualStudio.Component.TeamOffice",
"Microsoft.VisualStudio.Workload.NetCoreTools"
]
}

and reloaded and re-booted and now get this log :


10 Apr 07:05:21 - [info] Installing module: ncd-red-wireless, version: 1.5.31
10 Apr 07:05:28 - [warn] Installation of module ncd-red-wireless failed:
10 Apr 07:05:28 - [warn] ------------------------------------------
10 Apr 07:05:28 - [warn] prebuild-install WARN install No prebuilt binaries found (target=14.16.1 runtime=node arch=x64 libc= platform=win32)
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19041
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"
gyp ERR! cwd C:\Users\jmh_i.node-red\node_modules\ncd-red-comm\node_modules@serialport\bindings
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @serialport/bindings@2.0.8 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @serialport/bindings@2.0.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jmh_i\AppData\Roaming\npm-cache_logs\2021-04-09T21_05_28_495Z-debug.log

10 Apr 07:05:28 - [warn] ------------------------------------------
Error: Install failed
at C:\Users\jmh_i\AppData\Roaming\npm\node_modules\node-red\node_modules@node-red\registry\lib\installer.js:214:23
at processTicksAndRejections (internal/process/task_queues.js:93:5)
10 Apr 07:05:28 - [error] Error: Install failed


I tried to run the rebuild separately (thinking it may fix the problem or at least give a more detailed explanation) :


"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.16.1 | win32 | x64
gyp info find Python using Python version 3.9.4 found at "C:\Users\jmh_i\AppData\Local\Programs\Python\Python39\python.exe"
gyp info find VS using VS2019 (16.9.31129.286) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\jmh_i\AppData\Local\Programs\Python\Python39\python.exe
gyp info spawn args [
gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\jmh_i\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\jmh_i\AppData\Local\node-gyp\Cache\14.16.1\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\jmh_i\AppData\Local\node-gyp\Cache\14.16.1',
gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\jmh_i\\AppData\\Local\\node-gyp\\Cache\\14.16.1\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\Users\jmh_i',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\Users\jmh_i\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Warning: Missing input files:
C:\Users\jmh_i\build..\build\Release\binding.node
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
win_delay_load_hook.cc
binding.vcxproj -> C:\Users\jmh_i\build\Release\binding.node
gyp info ok


If I read this right, the "build" process is running OK, but is missing a file "binding.node".

Also, there appears to be 2 "node-gyp" versions running - Powershell gives V8.0.0 where the logs appear to give V5.1.0 (which confuses me).

Any ideas?

Only thing I can thing is that ncd-red-wireless requires
ncd-red-comm which requires serialport: ^7.1.5 which is 2 full versions out of date.

Thanks - I'll see if I can get that loaded an if it makes a difference.

Steve,

Found a fix :slight_smile: I think

Removed all node.js installs and modules. and node-red.

Deprecated node.js to V12.21.1 and re-installed.

Loaded serialport

Loaded ncd-red-wireless

All appears to be copacetic!

Thanks for your assistance cheers :beers:

1 Like

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