Npm ERR! `user` is not a valid npm option

Hi!
i have a problem at the moment when i install edge impulse on my raspberry pi 4.

I follow the instructions on the edge impulse https://docs.edgeimpulse.com/docs/development-platforms/officially-supported-cpu-gpu-targets/raspberry-pi-4.

The problem is that when I want to enter the following command, an error appears that does not allow me to proceed. I hope someone helps me.

Error:
erikstephan@raspberrypi:~ $ sudo npm config set user root && sudo npm install edge-impulse-linux -g --unsafe-perm
npm ERR! user is not a valid npm option

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-11-22T04_44_03_821Z-debug-0.log

Hi @erikstephan

To resolve this issue, you can simply remove the sudo npm config set user root part of the command. The sudo npm install edge-impulse-linux -g --unsafe-perm command should be sufficient to install the package globally on your system.

sudo npm install edge-impulse-linux -g --unsafe-perm

Best

Eoin

3 Likes

Hi @Eoin

Thank you! I’ve run into the same issue while installing it on RPi4 with Ubuntu 23 following the documentation https://docs.edgeimpulse.com/docs/development-platforms/officially-supported-cpu-gpu-targets/raspberry-pi-4 . it will be great if you can refresh it.

Regards,

Sergey

2 Likes

Ah thanks @vlasov01

Let me check that part now it should be updated, at least the later Node was updated. The unsafe perm tripped you up too?

Best

Eoin

1 Like

@Eoin

unsafe was working fine in combination with sudo.

Regards,

Sergey

2 Likes

Hi @Eoin

Thanks for responding and giving me the solution!

Regards

1 Like