Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem installing modules in NodeRed #7324

Open
TadyTheFish opened this issue Dec 25, 2024 · 2 comments
Open

Problem installing modules in NodeRed #7324

TadyTheFish opened this issue Dec 25, 2024 · 2 comments

Comments

@TadyTheFish
Copy link

TadyTheFish commented Dec 25, 2024

Hello
I have updated Dietpi from 9.8.0 to 9.9.0 and started to have problems with Node red.
If I try to install (or update) ANY of the available nodes I get an BADENGINE error from npm
2024-12-25T16:17:28.748Z [err] npm error code EBADENGINE 2024-12-25T16:17:28.748Z [err] npm error engine Unsupported engine 2024-12-25T16:17:28.748Z [err] npm error engine Not compatible with your version of node/npm: @homebridge/[email protected] 2024-12-25T16:17:28.748Z [err] npm error notsup Not compatible with your version of node/npm: @homebridge/[email protected] 2024-12-25T16:17:28.748Z [err] npm error notsup Required: {"node":"^18 || ^20 || ^22"} 2024-12-25T16:17:28.748Z [err] npm error notsup Actual: {"npm":"10.9.2","node":"v23.5.0"} 2024-12-25T16:17:28.749Z [err] npm error A complete log of this run can be found in: /mnt/dietpi_userdata/node-red/.npm/_logs/2024-12-25T16_17_27_651Z-debug-0.log 2024-12-25T16:17:28.757Z rc=1
The installed node.js is version 23 but no modules want that, even the official recommendation from Node red is to use version 22.
I installed NodeRed via dietpi-software and it pulls version 23
can you revert back to Node.js version 22?
If I try to install Node red via their official script it thrown se an error that I am running Dietpi and should install via Dietpi-software.
Thank you

@TadyTheFish
Copy link
Author

TadyTheFish commented Dec 25, 2024

For anyone facing the same problems, you can manually downgrade Node.js
wget https://raw.githubusercontent.com/MichaIng/nodejs-linux-installer/master/node-install.sh chmod +x node-install.sh sudo ./node-install.sh -v v20.18.1
and reboot the system
Worked for me and now I can install modules

@MichaIng
Copy link
Owner

We should switch to LTS versions by default. I checked the index we currently parse, and there is an LTS field indeed. It is a little inconsistent, sometimes containing the code name of the release, sometimes just "true", and some subversions of an LTS release have the field empty. But otherwise I think we can use it, taking the first release which has this field set to any value (other than "-"):

I need to add support for this (an --lts flag) to our Node.js installer, when I find time. Will be done until next DietPi release: https://github.com/MichaIng/nodejs-linux-installer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants