Why can't the serial palette be installed

sir, is there a solution about this problem ?

Maybe don't use node13 ? (Though we can't see the actual error in that short image)

serialport requires some native libraries to be built during the install. You're likely missing some native build tools or libraries. I'm not a Windows user though so I can't help with that. There's instructions at the end of this page: https://serialport.io/docs/guide-installation

It does tell the build from source step would be optional so maybe they don't provide a binary for your Node.js version like @dceejay hinted.

1 Like

I use the version 13.9.0 sir. I use this syntax (npm i node-red-node-serialport)

@dimas can you share more of the log? The screenshot you've shared tells us there was an error, but not what it was.

1 Like

The prebuilt bindings are listed here - https://github.com/serialport/node-serialport/releases
We currently use serialport 8.0.8 library which is at v72... this is at nodejs12. If you really need to use nodejs13 then you will need to make sure you have all the compiler tools installed.

(Though again - we also don't support NodeRED on non LTS versions of nodejs)

3 Likes

See this for details of which versions are currently supported
https://nodered.org/docs/faq/node-versions

1 Like

2020-06-18T10:24:36.199Z Install : node-red-node-serialport 0.10.3

2020-06-18T10:24:36.222Z npm.cmd install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-node-serialport@0.10.3
2020-06-18T10:24:43.269Z [out]
2020-06-18T10:24:43.269Z [out] > @serialport/bindings@8.0.8 install C:\Users\Dimas.node-red\node_modules@serialport\bindings
2020-06-18T10:24:43.269Z [out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2020-06-18T10:24:43.269Z [out]
2020-06-18T10:24:44.193Z [err] prebuild-install
2020-06-18T10:24:44.193Z [err] WARN install No prebuilt binaries found (target=13.9.0 runtime=node arch=x64 libc= platform=win32)
2020-06-18T10:24:44.217Z [out]
2020-06-18T10:24:44.217Z [out] C:\Users\Dimas.node-red\node_modules@serialport\bindings>if not
2020-06-18T10:24:44.217Z [out] 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 )
2020-06-18T10:24:45.263Z [err] gyp
2020-06-18T10:24:45.263Z [err]
2020-06-18T10:24:45.264Z [err] ERR! find Python
2020-06-18T10:24:45.264Z [err] gyp ERR!
2020-06-18T10:24:45.264Z [err] find Python Python is not set from command line or npm configuration
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python Python is not set from environment variable PYTHON
2020-06-18T10:24:45.264Z [err] gyp
2020-06-18T10:24:45.264Z [err] ERR! find Python checking if "python" can be used
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python - "python" is not in PATH or produced an error
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python checking if "python2" can be used
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python
2020-06-18T10:24:45.264Z [err] - "python2" is not in PATH or produced an error
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python checking if "python3" can be used
2020-06-18T10:24:45.264Z [err] gyp ERR!
2020-06-18T10:24:45.264Z [err] find Python - "python3" is not in PATH or produced an error
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python checking if the py launcher can be used to find Python 2
2020-06-18T10:24:45.264Z [err] gyp
2020-06-18T10:24:45.264Z [err] ERR! find Python - "py.exe" is not in PATH or produced an error
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python checking if Python is C:\Python27\python.exe
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python - "C:\Python27\python.exe" could not be run
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python
2020-06-18T10:24:45.264Z [err] checking if Python is C:\Python37\python.exe
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python - "C:\Python37\python.exe" could not be run
2020-06-18T10:24:45.264Z [err] gyp ERR!
2020-06-18T10:24:45.264Z [err] find Python
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python **********************************************************
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python You need to install the latest version of Python.
2020-06-18T10:24:45.264Z [err] gyp ERR!
2020-06-18T10:24:45.264Z [err] find Python Node-gyp should be able to find and use Python. If not,
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python
2020-06-18T10:24:45.264Z [err] you can try one of the following options:
2020-06-18T10:24:45.264Z [err] gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
2020-06-18T10:24:45.264Z [err] gyp
2020-06-18T10:24:45.265Z [err] ERR! find Python (accepted by both node-gyp and npm)
2020-06-18T10:24:45.265Z [err] gyp ERR!
2020-06-18T10:24:45.265Z [err] find Python - Set the environment variable PYTHON
2020-06-18T10:24:45.265Z [err] gyp ERR! find Python - Set the npm configuration variable python:
2020-06-18T10:24:45.265Z [err] gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
2020-06-18T10:24:45.265Z [err] gyp ERR!
2020-06-18T10:24:45.265Z [err] find Python For more information consult the documentation at:
2020-06-18T10:24:45.265Z [err] gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
2020-06-18T10:24:45.265Z [err] gyp ERR! find Python **********************************************************
2020-06-18T10:24:45.265Z [err] gyp ERR!
2020-06-18T10:24:45.265Z [err] find Python
2020-06-18T10:24:45.265Z [err] gyp
2020-06-18T10:24:45.266Z [err] ERR! configure error
2020-06-18T10:24:45.266Z [err] gyp ERR!
2020-06-18T10:24:45.266Z [err] stack Error: Could not find any Python installation to use
2020-06-18T10:24:45.266Z [err] gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
2020-06-18T10:24:45.266Z [err] gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
2020-06-18T10:24:45.266Z [err] gyp ERR!
2020-06-18T10:24:45.266Z [err] stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
2020-06-18T10:24:45.266Z [err] gyp ERR!
2020-06-18T10:24:45.266Z [err] stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
2020-06-18T10:24:45.266Z [err] gyp
2020-06-18T10:24:45.266Z [err] ERR! stack at exithandler (child_process.js:310:5)
2020-06-18T10:24:45.266Z [err] gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)
2020-06-18T10:24:45.266Z [err] gyp ERR! stack at ChildProcess.emit (events.js:321:20)
2020-06-18T10:24:45.266Z [err] gyp
2020-06-18T10:24:45.266Z [err] ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
2020-06-18T10:24:45.266Z [err] gyp ERR!
2020-06-18T10:24:45.266Z [err] stack at onErrorNT (internal/child_process.js:467:16)
2020-06-18T10:24:45.266Z [err] gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020-06-18T10:24:45.267Z [err] gyp
2020-06-18T10:24:45.267Z [err] ERR! System Windows_NT 10.0.18363
2020-06-18T10:24:45.267Z [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"
2020-06-18T10:24:45.267Z [err] gyp ERR! cwd C:\Users\Dimas.node-red\node_modules@serialport\bindings
2020-06-18T10:24:45.267Z [err] gyp ERR!
2020-06-18T10:24:45.267Z [err] node -v v13.9.0
2020-06-18T10:24:45.267Z [err] gyp
2020-06-18T10:24:45.267Z [err] ERR! node-gyp -v v5.0.7
2020-06-18T10:24:45.267Z [err] gyp ERR! not ok
2020-06-18T10:24:45.511Z [err] npm
2020-06-18T10:24:45.511Z [err] ERR! code ELIFECYCLE
2020-06-18T10:24:45.511Z [err] npm ERR!
2020-06-18T10:24:45.512Z [err] errno 1
2020-06-18T10:24:45.513Z [err] npm
2020-06-18T10:24:45.513Z [err] ERR! @serialport/bindings@8.0.8 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2020-06-18T10:24:45.513Z [err] npm ERR! Exit status 1
2020-06-18T10:24:45.513Z [err] npm ERR!
2020-06-18T10:24:45.513Z [err]
2020-06-18T10:24:45.513Z [err] npm ERR! Failed at the @serialport/bindings@8.0.8 install script.
2020-06-18T10:24:45.513Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-06-18T10:24:45.539Z [err]
2020-06-18T10:24:45.539Z [err] npm ERR! A complete log of this run can be found in:
2020-06-18T10:24:45.539Z [err] npm ERR! C:\Users\Dimas\AppData\Roaming\npm-cache_logs\2020-06-18T10_24_45_521Z-debug.log
2020-06-18T10:24:45.570Z rc=1

What do you deduce from the errors?

It seems to be a build error as was suggested. You could either downgrade to Node.js or install node-gyp and the required build tools as instructed here: http://www.youtube.com/watch?v=bugO7qYc8Po

1 Like

thanks a lot sir, after I use version 12.13 the serial palette can be installed

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