Installation error, wrong npm and node version?

Good evening,
I am trying to install a client node using the ' Manage pallette', and am getting the following error:

npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: eufy-security-client@2.9.1
npm ERR! notsup Not compatible with your version of node/npm: eufy-security-client@2.9.1
npm ERR! notsup Required: {"node":">=18.0.0"}
npm ERR! notsup Actual: {"npm":"8.19.4","node":"v16.20.2"}

When I check my log file I see:

1 info using npm@10.2.3
2 info using node@v18.19.0

How can I solve this?

My guess: you have n or nvm installed.

uninstall n and/or nvm then see what version of nodejs is actually installed - if >= 18, try to install the contrib node again. If < 18, update nodejs

I had indeed installed nvm and now uninstalled it:

Maru@RPi4:/ $ npm remove -g npm@latest
up to date in 966ms

Maru@RPi4:/ $node -v
v18.19.0

Unfortunately same error:

2023-12-03T18:48:27.238Z [err] ERR! notsup Not compatible with your version of node/npm: eufy-security-client@2.9.1
2023-12-03T18:48:27.238Z [err] npm ERR!
2023-12-03T18:48:27.238Z [err] notsup Required: {"node":">=18.0.0"}
2023-12-03T18:48:27.238Z [err] npm ERR!
2023-12-03T18:48:27.240Z [err] notsup Actual: {"npm":"8.19.4","node":"v16.20.2"}

Kinda. But this time if you do node -v you will see you really do have v16

The answer is:

Then you can proceed.

Oh, I see you said it still shows 18 on the command line.

This is why I avoid node version managers.

I think you have remnants of nvm - there are guides for fully removing it

If you have a folder ~/.nvm then delete it.

Strange,

Maru@RPi4:~ $ rm -rf ~/.nvm
Maru@RPi4:~ $ nvm -v
0.39.5

No, still the same error

Full uninstall details: How to Install and Use NVM (Node Version Manager) | Linode Docs

That was a long run..... the NVM documentation was very useful, nvm has been completely removed.
Indeed, there were still remnants of nvm (symlinks and directories) present, which were detected during a upgrade installation of node-red, via Running on Raspberry Pi.
After removing the symlink and directories and reinstalling node-red I got the message:

npm v10.2.4 does not support Node.js v16.20.2. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/

I ran the script again with the ---node20 parameter and it worked. I have now:
node v20.10.0
npm 10.2.3
and the eufy node :slightly_smiling_face:
Thanks @Steve-Mcl Steve and @Colin Collin for the help.

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