Trouble Installing NCD Node Red Nodes

I’m trying to get Node Red setup with these products so I can periodically write the data from the thermocouple sensor to a CSV file. I’ve never used Node Red before, and I’m trying to follow your tutorial at (Setting up Node-RED and your Wireless Sensor Network). I’ve got Node Red installed and have successful created some of their demo flows. I’m trying to install your custom NCD nodes and it doesn’t appear to be working because after I run the installation command (Setting up Node-RED and your Wireless Sensor Network), then relaunch Node Red, I don’t see any nodes when filtering on “ncd”. See below for the output from Windows 10 PowerShell when attempting to install your nodes…

PS C:\Users\295159> npm i ncd-red-wireless node-red-dashboard

@serialport/bindings@2.0.8 install C:\Users\295159\node_modules@serialport\bindings
prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=14.15.1 runtime=node arch=x64 libc= platform=win32)

C:\Users\295159\node_modules@serialport\bindings>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 )
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if “python” can be used
gyp ERR! find Python - “python” is not in PATH or produced an error
gyp ERR! find Python checking if “python2” can be used
gyp ERR! find Python - “python2” is not in PATH or produced an error
gyp ERR! find Python checking if “python3” can be used
gyp ERR! find Python - “python3” is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - “py.exe” is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - “C:\Python27\python.exe” could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - “C:\Python37\python.exe” could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python=“C:\Path\To\python.exe”
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python “C:\Path\To\python.exe”
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:315:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.18363
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\295159\node_modules@serialport\bindings
gyp ERR! node -v v14.15.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\295159\package.json’
npm WARN 295159 No description
npm WARN 295159 No repository field.
npm WARN 295159 No README data
npm WARN 295159 No license field.

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\L_295159\AppData\Roaming\npm-cache_logs\2020-12-14T19_04_17_251Z-debug.log
PS C:\Users\295159>

Hi,

These errors seem to be related to your installation of Python. I would recommend doing some research on installing Python and Python3 on your Windows computer.

Are you attempting to install the NCD Node-Red libraries through the command prompt or through the pallet manager inside of Node-Red?

I ran into this a few days ago, the issue actually seems to be related to the serialport library. I solved it by deleting the node_modules folder, rolling back to node 12, and then running npm i from the node-red directory to reinstall and rebuild all binaries and libraries.

2 Likes

Also, if you plan to use node red and haven’t already, look into installing nvm (node version manager). It is extremely helpful for situations like this when a dependency library has outstanding issues for the latest versions of node.

1 Like

Thank you Trey. I uninstalled node 14.x and then installed node 12.20 and I was able to install ncd-red-wireless.