Issue with Linux CLI install

Issue with Linux CLI Install


After following the instructions for the linux cli installation afer running the command npm install -g edge-impulse-cli I ran into the error code:


prebuild-install WARN install EACCES: permission denied, access ‘/root/.npm’

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build’

gyp ERR! System Linux 5.8.0-59-generic

gyp ERR! command “/usr/bin/node” “/usr/bin/node-gyp” “rebuild”

gyp ERR! cwd /usr/local/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings

gyp ERR! node -v v10.19.0

gyp ERR! node-gyp -v v6.1.0

gyp ERR! not ok

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @serialport/bindings@8.0.8 install: prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the @serialport/bindings@8.0.8 install script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2021-07-02T10_05_48_058Z-debug.log


I tried using sudo npm install -g edge-imuplse-cli as there was a permissions error and this did not work. I then read through the faqs and used the command npm config set user root as there was a similar error but this did not work for both the sudo and non-sudo command.

My linux version is: Ubuntu 20.04.2 LTS
Python3 version: 3.8.5
NPM version: 6.14.4

Hello @ando20,

From what I see from this error, it seems that your NodeJS version is the 10.19.0:

gyp ERR! node -v v10.19.0

Could you try using node v14 or higher to see if that fixes your issue please?

Regards,

Louis

1 Like

Also on Linux systems you’ll want to install as root by default. See the instructions f.e. here: https://docs.edgeimpulse.com/docs/raspberry-pi-4#2-installing-dependencies