Edge impulse cli installtion issue in linux environment

Hello,
I want to connect himax_we_plus Eval board to linux PC and want to see video streaming (first step).
Once above step is done then have to create build environment in linux to build my own application.
I tried in windows environment and able to connect to edge studio but getting error in linux PC.
Getting error when executing below command
“npm install edge-impulse-linux”
node version: v10.19.0
npm version: 6.14.4

using linux pc
image

8363 warn notsup Unsupported engine for sharp@0.29.1: wanted: {“node”:">=12.13.0"} (current: {“node”:“10.19.0”,“npm”:“6.14.4”})
8364 warn notsup Not compatible with your version of node/npm: sharp@0.29.1
8365 verbose notsup Not compatible with your version of node/npm: sharp@0.29.1
8365 verbose notsup Required: {“node”:">=12.13.0"}
8365 verbose notsup Actual: {“npm”:“6.14.4”,“node”:“10.19.0”}
8366 warn notsup Unsupported engine for color@4.2.1: wanted: {“node”:">=12.5.0"} (current: {“node”:“10.19.0”,“npm”:“6.14.4”})
8367 warn notsup Not compatible with your version of node/npm: color@4.2.1
8368 verbose notsup Not compatible with your version of node/npm: color@4.2.1
8368 verbose notsup Required: {“node”:">=12.5.0"}
8368 verbose notsup Actual: {“npm”:“6.14.4”,“node”:“10.19.0”}
8369 warn enoent ENOENT: no such file or directory, open ‘/home/emqos24/Desktop/himax/himax_flash_tool/package.json’
8370 verbose enoent This is related to npm not being able to find a file.
8371 warn tsargs@1.4.1 requires a peer of typescript@^3.1.6 but none is installed. You must install peer dependencies yourself.
8372 warn himax_flash_tool No description
8373 warn himax_flash_tool No repository field.
8374 warn himax_flash_tool No README data
8375 warn himax_flash_tool No license field.
8376 verbose stack Error: sharp@0.29.1 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
8376 verbose stack Exit status 1
8376 verbose stack at EventEmitter. (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
8376 verbose stack at EventEmitter.emit (events.js:198:13)
8376 verbose stack at ChildProcess. (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
8376 verbose stack at ChildProcess.emit (events.js:198:13)
8376 verbose stack at maybeClose (internal/child_process.js:982:16)
8376 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
8377 verbose pkgid sharp@0.29.1
8378 verbose cwd /home/emqos24/Desktop/himax/himax_flash_tool
8379 verbose Linux 5.13.0-28-generic
8380 verbose argv “/usr/bin/node” “/usr/bin/npm” “install” “edge-impulse-linux”
8381 verbose node v10.19.0
8382 verbose npm v6.14.4
8383 error code ELIFECYCLE
8384 error errno 1
8385 error sharp@0.29.1 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
8385 error Exit status 1
8386 error Failed at the sharp@0.29.1 install script.
8386 error This is probably not a problem with npm. There is likely additional logging output above.
8387 verbose exit [ 1, true ]

Hi @prashant.s,

Looks like you have an old version of Node (v10), you need Node v14 or higher: https://docs.edgeimpulse.com/docs/cli-installation

Aurelien


Tried many ways to install updated node.js
npm install -g npm
but didn’t updated to v14 or higher

You probably need to update the list of packages from the repo first (ie: apt-get update).

But best is to just follow the Node link or the command line in our doc:

Executed node apt-get update command but got below errors

emqos24@emqos24:~/Desktop/himax/himax_flash_tool$ node apt-get update
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module ‘/home/emqos24/Desktop/himax/himax_flash_tool/apt-get’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
emqos24@emqos24:~/Desktop/himax/himax_flash_tool$

Executed apt-get update but getting below errors
s24@emqos24:~/Desktop/himax/himax_flash_tool$ apt-get update
Reading package lists… Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
emqos24@emqos24:~/Desktop/himax/himax_flash_tool$

node version: v17.5.0
npm version: 8.4.1

Got issue when installing edge impulse cli
npm install -g edge-impulse-cli.
Below are logs of above command
emqos24@emqos24:~/Desktop/himax/himax_flash_tool$ npm install -g edge-impulse-cli
npm WARN deprecated @zeit/dockerignore@0.0.5: “@zeit/dockerignore” is no longer maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.4: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142

added 11 packages, removed 14 packages, changed 374 packages, and audited 386 packages in 1m

12 packages are looking for funding
run npm fund for details

11 vulnerabilities (6 moderate, 3 high, 2 critical)

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.
npm notice
npm notice New minor version of npm available! 8.4.1 -> 8.5.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.5.1
npm notice Run npm install -g npm@8.5.1 to update!
npm notice

So i tried
npm audit fix --force
Below is the image which shows error.for above command

image

Because to resolve previous post error. I tried below commands
npm cache clean --force
npm fund
npm audit fix --force

After this again executed “edge-impulse-daemon” but still same issue. below image shows error for above commands:

image

Hello @prashant.s,

It seems that there are only warnings here in your logs, can you try again this npm install -g edge-impulse-cli command? and run the edge-impulse-deamon after?

I suspect the npm audit fix --force to have uninstall for necessary package.

If it still does not work, can you completely remove NodeJS from your linux machine and follow the installation procedure @aurel shared before?

Regards,

Louis

i tried executing edge-impulse-deamon but it didnt worked.
Will remove nodejs and follow procedure shared by aurel.

This time something more logs are displayed while installing but again same issue
edge-impulse-deamon: command not found

Is there any other commands to be executed…

Maybe you can try this installation method if none of the above work:

Let me know of the outcome :slight_smile:

Regards,

Louis

Below are the outcome
emqos24@emqos24:~/Desktop/himax/sourcecode/testcode/ei-install-scripts$ . ./install-linux.sh
[sudo] password for emqos24:
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://deb.anydesk.com all InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 https://deb.nodesource.com/node_14.x focal InRelease
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:7 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:8 https://apt.kitware.com/ubuntu focal InRelease
Hit:9 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Fetched 114 kB in 6s (17.6 kB/s)
Reading package lists… Done
Reading package lists… Done
Building dependency tree
Reading state information… Done
g++ is already the newest version (4:9.3.0-1ubuntu2).
gcc is already the newest version (4:9.3.0-1ubuntu2).
make is already the newest version (4.2.1-1.2).
python3 is already the newest version (3.8.2-0ubuntu2).
python2 is already the newest version (2.7.17-2ubuntu4).
sox is already the newest version (14.4.2+git20190427-2).
build-essential is already the newest version (12.8ubuntu1.1).
curl is already the newest version (7.68.0-1ubuntu2.7).
ffmpeg is already the newest version (7:4.2.4-1ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
npm prefix = /home/emqos24/.npm-global
Installing edge-impulse-cli…
npm WARN deprecated request-promise@4.2.4: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @zeit/dockerignore@0.0.5: “@zeit/dockerignore” is no longer maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
/home/emqos24/.npm-global/bin/edge-impulse-blocks -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/blocks.js
/home/emqos24/.npm-global/bin/edge-impulse-daemon -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/daemon.js
/home/emqos24/.npm-global/bin/edge-impulse-uploader -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/uploader.js
/home/emqos24/.npm-global/bin/edge-impulse-data-forwarder -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/data-forwarder.js
/home/emqos24/.npm-global/bin/edge-impulse-run-impulse -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/run-impulse.js
/home/emqos24/.npm-global/bin/eta-flash-tool -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/eta-flash-tool/flashtool.js
/home/emqos24/.npm-global/bin/himax-flash-tool -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/himax-flash-tool/flashtool.js
/home/emqos24/.npm-global/bin/edge-impulse-framebuffer2jpg -> /home/emqos24/.npm-global/lib/node_modules/edge-impulse-cli/build/cli/framebuffer-to-jpg.js
npm WARN tsargs@1.4.1 requires a peer of typescript@^3.1.6 but none is installed. You must install peer dependencies yourself.

  • edge-impulse-cli@1.14.5
    updated 1 package in 58.125s

Maybe a dumb remark but have you tried to close and reopen your terminal and try again?

you want me to try

above once again by reopening terminal…?

No just quit your terminal and try again the edge-impulse-daemon command to see if it can find the command.

image

NOT worked, still issue persists…

Alright, then maybe you can try some of @janjongboom’s tips from here: Edge-impulse-daemon: command not found

image

Not getting
“.npm-packages/bin/edge-impulse-daemon”
above path


tried to create by using
ln -s /home/emqos24/.npm-global/bin /usr/local/bin/edge-impulse-daemon

command but got error.


Added to path also but same issue.