INSTALLATION ERROR
Closed this issue · 19 comments
Hello everyone
When I try to install node-red it gives me this message.
Has anyone an idea what could be wrong?
2022-12-07T05:08:50.977Z Install : node-red-contrib-m-bus 3.0.0
2022-12-07T05:08:50.407Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-m-bus@3.0.0
2022-12-07T05:08:52.160Z [err] npm
2022-12-07T05:08:52.162Z [err] WARN
2022-12-07T05:08:52.162Z [err] config production Use --omit=dev
instead.
2022-12-07T05:08:55.835Z [err] npm
2022-12-07T05:08:55.835Z [err] ERR!
2022-12-07T05:08:55.835Z [err] code 1
2022-12-07T05:08:55.836Z [err] npm
2022-12-07T05:08:55.837Z [err] ERR! path
2022-12-07T05:08:55.837Z [err] /config/node-red/node_modules/node-mbus
2022-12-07T05:08:55.842Z [err] npm ERR!
2022-12-07T05:08:55.843Z [err] command failed
2022-12-07T05:08:55.843Z [err] npm
2022-12-07T05:08:55.844Z [err] ERR! command sh -c node-gyp rebuild
2022-12-07T05:08:55.844Z [err] npm ERR!
2022-12-07T05:08:55.844Z [err] gyp info it worked if it ends with ok
2022-12-07T05:08:55.844Z [err] npm
2022-12-07T05:08:55.845Z [err] ERR! gyp info using node-gyp@9.0.0
2022-12-07T05:08:55.845Z [err] npm ERR! gyp info using node@16.17.1 | linux | arm64
2022-12-07T05:08:55.845Z [err] npm ERR! gyp ERR! find Python
2022-12-07T05:08:55.845Z [err] npm ERR!
2022-12-07T05:08:55.846Z [err] gyp ERR! find Python checking Python explicitly set from command line or npm configuration
2022-12-07T05:08:55.846Z [err] npm ERR! gyp ERR! find Python - "--python=" or "npm config get python" is "/usr/bin/python3"
2022-12-07T05:08:55.846Z [err] npm ERR! gyp ERR! find Python - "/usr/bin/python3" is not in PATH or produced an error
2022-12-07T05:08:55.846Z [err] npm
2022-12-07T05:08:55.846Z [err] ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
2022-12-07T05:08:55.846Z [err] npm ERR!
2022-12-07T05:08:55.846Z [err] gyp ERR! find Python checking if "python3" can be used
2022-12-07T05:08:55.846Z [err] npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
2022-12-07T05:08:55.846Z [err] npm ERR! gyp ERR! find Python checking if "python" can be used
2022-12-07T05:08:55.846Z [err] npm
2022-12-07T05:08:55.846Z [err] ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
2022-12-07T05:08:55.846Z [err] npm ERR!
2022-12-07T05:08:55.846Z [err] gyp ERR! find Python
2022-12-07T05:08:55.846Z [err] npm ERR! gyp ERR! find Python **********************************************************
2022-12-07T05:08:55.846Z [err] npm
2022-12-07T05:08:55.847Z [err] ERR! gyp ERR! find Python You need to install the latest version of Python.
2022-12-07T05:08:55.847Z [err] npm
2022-12-07T05:08:55.847Z [err] ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
2022-12-07T05:08:55.847Z [err] npm ERR!
2022-12-07T05:08:55.847Z [err] gyp ERR! find Python you can try one of the following options:
2022-12-07T05:08:55.847Z [err] npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
2022-12-07T05:08:55.847Z [err] npm
2022-12-07T05:08:55.847Z [err] ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
2022-12-07T05:08:55.847Z [err] npm
2022-12-07T05:08:55.847Z [err] ERR! gyp ERR! find Python - Set the environment variable PYTHON
2022-12-07T05:08:55.847Z [err] npm ERR!
2022-12-07T05:08:55.847Z [err] gyp ERR! find Python - Set the npm configuration variable python:
2022-12-07T05:08:55.847Z [err] npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
2022-12-07T05:08:55.848Z [err] npm ERR!
2022-12-07T05:08:55.848Z [err] gyp ERR! find Python For more information consult the documentation at:
2022-12-07T05:08:55.848Z [err] npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
2022-12-07T05:08:55.848Z [err] npm ERR! gyp ERR! find Python **********************************************************
2022-12-07T05:08:55.848Z [err] npm ERR!
2022-12-07T05:08:55.848Z [err] gyp ERR! find Python
2022-12-07T05:08:55.848Z [err] npm ERR! gyp ERR! configure error
2022-12-07T05:08:55.848Z [err] npm
2022-12-07T05:08:55.848Z [err] ERR! gyp ERR! stack Error: Could not find any Python installation to use
2022-12-07T05:08:55.848Z [err] npm
2022-12-07T05:08:55.848Z [err] ERR! gyp ERR! stack at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
2022-12-07T05:08:55.848Z [err] npm ERR!
2022-12-07T05:08:55.848Z [err] gyp ERR! stack at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
2022-12-07T05:08:55.848Z [err] npm ERR! gyp ERR! stack at PythonFinder. (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
2022-12-07T05:08:55.849Z [err] npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
2022-12-07T05:08:55.849Z [err] npm
2022-12-07T05:08:55.849Z [err] ERR! gyp ERR! stack at exithandler (node:child_process:408:5)
2022-12-07T05:08:55.849Z [err] npm
2022-12-07T05:08:55.849Z [err] ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:420:5)
2022-12-07T05:08:55.849Z [err] npm ERR!
2022-12-07T05:08:55.849Z [err] gyp ERR! stack at ChildProcess.emit (node:events:513:28)
2022-12-07T05:08:55.849Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
2022-12-07T05:08:55.849Z [err] npm
2022-12-07T05:08:55.849Z [err] ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)
2022-12-07T05:08:55.849Z [err] npm
2022-12-07T05:08:55.849Z [err] ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
2022-12-07T05:08:55.849Z [err] npm ERR!
2022-12-07T05:08:55.849Z [err] gyp ERR! System Linux 5.15.61-v8
2022-12-07T05:08:55.849Z [err] npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2022-12-07T05:08:55.850Z [err] npm ERR! gyp ERR! cwd /config/node-red/node_modules/node-mbus
2022-12-07T05:08:55.850Z [err] npm
2022-12-07T05:08:55.850Z [err] ERR! gyp ERR! node -v v16.17.1
2022-12-07T05:08:55.850Z [err] npm ERR!
2022-12-07T05:08:55.850Z [err] gyp ERR! node-gyp -v v9.0.0
2022-12-07T05:08:55.850Z [err] npm ERR! gyp ERR! not ok
2022-12-07T05:08:55.857Z [err]
2022-12-07T05:08:55.858Z [err] npm ERR! A complete log of this run can be found in:
2022-12-07T05:08:55.858Z [err] npm ERR! /root/.npm/_logs/2022-12-07T05_08_52_006Z-debug-0.log
2022-12-07T05:08:55.883Z rc=1
Firstly ensure you have build essentials installed as seems python3 isn't present: sudo apt update && sudo apt install build-essential
Then install it manually using npm install node-red-contrib-m-bus
from your ~/.node-red
dir
After this simply restart node-red and it should be there
Solution for Home Assistant Node-Red Add-on users. Add python3 to system_packages in the add-on's configuration.
Did you follow this steps? #24 (comment)
Hello,
If in Home Assistant on the add-on's configuration tab press the 3-dot symbol -> edit in YAML and add python3 to system_packages as mentioned in comment #24 (comment) . This worked for me at the time of the comment, I am not aware if this still works.
Can we have a look at your configuration?
You cannot set the parity, only the baud rate
8E1 if I remember correctly
How can I send a specific query to my meter, e.g. 68 03 03 68 53 01 b1 05 16?
You can't