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

Module cannot be updated on v4.0.2 #448

Open
fredrikjohnsson opened this issue Aug 14, 2024 · 2 comments
Open

Module cannot be updated on v4.0.2 #448

fredrikjohnsson opened this issue Aug 14, 2024 · 2 comments

Comments

@fredrikjohnsson
Copy link

What are the steps to reproduce?

Update any module (palette)

What happens?

Getting npm error code EBADENGINE

What do you expect to happen?

Module to update

Please tell us about your environment:

Using Ubuntu running amd64 docker image. Getting the following error log:

2024-08-14T11:17:00.981Z Install : node-red-contrib-home-assistant-websocket 0.65.1
2024-08-14T11:17:01.176Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict [email protected]
2024-08-14T11:17:05.839Z [err] npm error code EBADENGINE
2024-08-14T11:17:05.842Z [err] npm error engine Unsupported engine
2024-08-14T11:17:05.842Z [err] npm error engine Not compatible with your version of node/npm: @azure/[email protected]
2024-08-14T11:17:05.842Z [err] npm error notsup Not compatible with your version of node/npm: @azure/[email protected]
2024-08-14T11:17:05.842Z [err] npm error notsup Required: {"node":"10 || 12 || 14 || 16"}
2024-08-14T11:17:05.842Z [err] npm error notsup Actual: {"npm":"10.7.0","node":"v18.20.4"}
2024-08-14T11:17:05.844Z [err]
2024-08-14T11:17:05.845Z [err] npm error A complete log of this run can be found in: /data/.npm/_logs/2024-08-14T11_17_01_311Z-debug-0.log
2024-08-14T11:17:05.856Z rc=1

Tested on both latest and latest-18 (Node-Red 4.0.2), getting the same result except actual version of node is v20.

@hardillb
Copy link
Member

Please confirm this is a system that was upgraded from Node-RED 3.1.x?

The default latest tag for Node-RED 3.1.x Docker builds is NodeJS 16 so one of the nodes you have installed at that level has a dependency on @azure/[email protected] which has a node engines section in it's package.json which limits it to versions 10, 12, 14, or 16.

Node-RED 4.0.x is available with containers based on NodeJS 18, 20 & 22 so none of the 4.0.x container will match that restriction.

When npm is used to install a node it validates all existing nodes, which is why it's failing.

You have a few options:

  1. revert back to Node-RED 3.1.11
  2. create a shell in running container (docker exec -it <name/id of container> /bin/bash). In this run the following commands
  • cd /data
  • npm ls @azure/msal-node
    This will tell you which Node-RED node you have installed that has the dependency problem. You can then try and upgrade that node first or remove it

@fredrikjohnsson
Copy link
Author

Yes, this was upgraded from Node-RED 3.1.x.

In a shell I installed latest version of @azure/msal-node using npm and this looks like it could have fixed the problem.

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

No branches or pull requests

2 participants