Edge-impulse-daemon: command not found

Just purchased the B-L475E-IOT01A 1 and started working on the installation guidelines on the
st-b-l475e-iot01a page.

And when I reached this command line

edge-impulse-daemon

I got:

edge-impulse-daemon: command not found

Any help, plz.

UPDATE-1:

I just noticed that when I installed/run:

npm install -g edge-impulse-cli @serialport/terminal

I had this output message:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
/home/ic6/.npm-packages/bin/serialport-terminal -> /home/ic6/.npm-packages/lib/node_modules/@serialport/terminal/lib/index.js
/home/ic6/.npm-packages/bin/edge-impulse-daemon -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/daemon.js
/home/ic6/.npm-packages/bin/edge-impulse-data-forwarder -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/data-forwarder.js
/home/ic6/.npm-packages/bin/edge-impulse-uploader -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/uploader.js
npm WARN tsargs@1.4.0 requires a peer of typescript@^3.1.6 but none is installed. You must install peer dependencies yourself.

  • edge-impulse-cli@1.6.7
  • @serialport/terminal@9.0.0
    updated 2 packages in 5.435s

Is that the reason why?

How I’m suppose to install these two packages?

UPDATE-2:

I tried to install the above required pkgs:

sudo npm install @serialport/terminal@9.0.0
sudo npm install edge-impulse-cli@1.6.7

Then, I re-run:

sudo npm install -g edge-impulse-cli @serialport/terminal

And what I got was this:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
loadDep:commander → mapTo ▀ ╢████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
/home/ic6/.npm-packages/bin/serialport-terminal -> /home/ic6/.npm-packages/lib/node_modules/@serialport/terminal/lib/index.js
/home/ic6/.npm-packages/bin/edge-impulse-daemon -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/daemon.js
/home/ic6/.npm-packages/bin/edge-impulse-uploader -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/uploader.js
/home/ic6/.npm-packages/bin/edge-impulse-data-forwarder -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/data-forwarder.js
/home/ic6/.npm-packages/lib
├── @serialport/terminal@9.0.0
└─┬ edge-impulse-cli@1.6.7
├── UNMET PEER DEPENDENCY bufferutil@^4.0.1
└── UNMET PEER DEPENDENCY utf-8-validate@^5.0.2

npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.0 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN tsargs@1.4.0 requires a peer of typescript@^3.1.6 but none was installed.

I am kind of lost/frustrated here!

@ahmedkhalaf1 It looks like it didn’t add it to your PATH maybe. Could you try:

ln -s /home/ic6/.npm-packages/bin/edge-impulse-daemon /usr/local/bin/edge-impulse-daemon

Or add the /home/ic6/.npm-packages/bin/ folder to your PATH.

Hey Jan,

I added the path then run the

edge-impulse-daemon

but got this output:

/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/bindings/bindings.js:121
throw e;
^

Error: The module ‘/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build/Release/bindings.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Object.Module._extensions…node (internal/modules/cjs/loader.js:1188:18)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at bindings (/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/bindings/bindings.js:112:48)
at Object. (/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/lib/linux.js:2:36)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)

@ahmedkhalaf1 that’s super weird. It looks like old things are still lingering. Have you ever installed any of the tools before?

Could you post the output of:

$ npm uninstall edge-impulse-cli -g
$ npm install edge-impulse-cli@latest -g

I uninstalled then:

sudo npm install edge-impulse-cli@latest -g

The output:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
loadDep:readable-stream → ▌ ╢███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
/home/ic6/.npm-packages/bin/edge-impulse-daemon -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/daemon.js
/home/ic6/.npm-packages/bin/edge-impulse-data-forwarder -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/data-forwarder.js
/home/ic6/.npm-packages/bin/edge-impulse-uploader -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/uploader.js

@serialport/bindings@8.0.8 install /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings
prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access ‘/home/ic6/.npm’
make: Entering directory ‘/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build’
CXX(target) Release/obj.target/bindings/src/serialport.o
CXX(target) Release/obj.target/bindings/src/serialport_unix.o
…/src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’:
…/src/serialport_unix.cpp:166:5: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
int setup(int fd, OpenBaton *data) {
^~~~~
In file included from /usr/include/stdio.h:862:0,
from …/src/serialport.h:3,
from …/src/serialport_unix.cpp:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output 20 or more bytes (assuming 1043) into a destination of size 1024
__bos (__s), __fmt, __va_arg_pack ());
^
…/src/serialport_unix.cpp: In function ‘void EIO_Open(uv_work_t*)’:
…/src/serialport_unix.cpp:79:6: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
void EIO_Open(uv_work_t* req) {
^~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from …/src/serialport.h:3,
from …/src/serialport_unix.cpp:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output 22 or more bytes (assuming 1045) into a destination of size 1024
__bos (__s), __fmt, __va_arg_pack ());
^
CXX(target) Release/obj.target/bindings/src/poller.o
CXX(target) Release/obj.target/bindings/src/serialport_linux.o
SOLINK_MODULE(target) Release/obj.target/bindings.node
COPY Release/bindings.node
make: Leaving directory ‘/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build’

serialport@8.0.8 postinstall /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/serialport
node thank-you.js

Thank you for using serialport!
If you rely on this package, please consider supporting our open collective:

https://opencollective.com/serialport/donate

/home/ic6/.npm-packages/lib
└─┬ edge-impulse-cli@1.6.7
├─┬ borc@2.1.2
│ ├── bignumber.js@9.0.0
│ ├─┬ buffer@5.6.0
│ │ └── base64-js@1.3.1
│ ├── commander@2.20.3
│ ├── ieee754@1.1.13
│ ├── iso-url@0.4.7
│ ├─┬ json-text-sequence@0.1.1
│ │ └── delimit-stream@0.1.0
│ └─┬ readable-stream@3.6.0
│ ├── inherits@2.0.4
│ ├── string_decoder@1.3.0
│ └── util-deprecate@1.0.2
├── UNMET PEER DEPENDENCY bufferutil@^4.0.1
├─┬ cbor@5.0.2
│ └── nofilter@1.0.3
├── commander@4.1.1
├─┬ inquirer@7.2.0
│ ├─┬ ansi-escapes@4.3.1
│ │ └── type-fest@0.11.0
│ ├─┬ chalk@3.0.0
│ │ ├─┬ ansi-styles@4.2.1
│ │ │ ├── @types/color-name@1.1.1
│ │ │ └─┬ color-convert@2.0.1
│ │ │ └── color-name@1.1.4
│ │ └─┬ supports-color@7.1.0
│ │ └── has-flag@4.0.0
│ ├─┬ cli-cursor@3.1.0
│ │ └─┬ restore-cursor@3.1.0
│ │ ├─┬ onetime@5.1.0
│ │ │ └── mimic-fn@2.1.0
│ │ └── signal-exit@3.0.3
│ ├── cli-width@2.2.1
│ ├─┬ external-editor@3.1.0
│ │ ├── chardet@0.7.0
│ │ ├─┬ iconv-lite@0.4.24
│ │ │ └── safer-buffer@2.1.2
│ │ └─┬ tmp@0.0.33
│ │ └── os-tmpdir@1.0.2
│ ├─┬ figures@3.2.0
│ │ └── escape-string-regexp@1.0.5
│ ├── lodash@4.17.15
│ ├── mute-stream@0.0.8
│ ├── run-async@2.4.1
│ ├─┬ rxjs@6.5.5
│ │ └── tslib@1.13.0
│ ├─┬ string-width@4.2.0
│ │ ├── emoji-regex@8.0.0
│ │ └── is-fullwidth-code-point@3.0.0
│ ├─┬ strip-ansi@6.0.0
│ │ └── ansi-regex@5.0.0
│ └── through@2.3.8
├─┬ npm-registry-fetch@5.0.1
│ ├── bluebird@3.7.2
│ ├── figgy-pudding@3.5.2
│ ├─┬ lru-cache@5.1.1
│ │ └── yallist@3.1.1
│ ├─┬ make-fetch-happen@6.1.0
│ │ ├─┬ agentkeepalive@3.5.2
│ │ │ └── humanize-ms@1.2.1
│ │ ├─┬ cacache@13.0.1
│ │ │ ├── chownr@1.1.4
│ │ │ ├── fs-minipass@2.1.0
│ │ │ ├─┬ glob@7.1.6
│ │ │ │ ├── fs.realpath@1.0.0
│ │ │ │ ├─┬ inflight@1.0.6
│ │ │ │ │ └── wrappy@1.0.2
│ │ │ │ ├─┬ minimatch@3.0.4
│ │ │ │ │ └─┬ brace-expansion@1.1.11
│ │ │ │ │ ├── balanced-match@1.0.0
│ │ │ │ │ └── concat-map@0.0.1
│ │ │ │ ├── once@1.4.0
│ │ │ │ └── path-is-absolute@1.0.1
│ │ │ ├── graceful-fs@4.2.4
│ │ │ ├── infer-owner@1.0.4
│ │ │ ├── mkdirp@0.5.5
│ │ │ ├─┬ move-concurrently@1.0.1
│ │ │ │ ├── aproba@1.2.0
│ │ │ │ ├─┬ copy-concurrently@1.0.5
│ │ │ │ │ └── iferr@0.1.5
│ │ │ │ ├─┬ fs-write-stream-atomic@1.0.10
│ │ │ │ │ ├── imurmurhash@0.1.4
│ │ │ │ │ └─┬ readable-stream@2.3.7
│ │ │ │ │ ├── isarray@1.0.0
│ │ │ │ │ ├── process-nextick-args@2.0.1
│ │ │ │ │ ├── safe-buffer@5.1.2
│ │ │ │ │ └── string_decoder@1.1.1
│ │ │ │ └── run-queue@1.0.3
│ │ │ ├─┬ p-map@3.0.0
│ │ │ │ └─┬ aggregate-error@3.0.1
│ │ │ │ ├── clean-stack@2.2.0
│ │ │ │ └── indent-string@4.0.0
│ │ │ ├── promise-inflight@1.0.1
│ │ │ ├── rimraf@2.7.1
│ │ │ └─┬ unique-filename@1.1.1
│ │ │ └── unique-slug@2.0.2
│ │ ├── http-cache-semantics@3.8.1
│ │ ├─┬ http-proxy-agent@2.1.0
│ │ │ ├─┬ agent-base@4.3.0
│ │ │ │ └─┬ es6-promisify@5.0.0
│ │ │ │ └── es6-promise@4.2.8
│ │ │ └─┬ debug@3.1.0
│ │ │ └── ms@2.0.0
│ │ ├── https-proxy-agent@3.0.1
│ │ ├── minipass-collect@1.0.2
│ │ ├── minipass-flush@1.0.5
│ │ ├── minipass-pipeline@1.2.3
│ │ ├─┬ promise-retry@1.1.1
│ │ │ ├── err-code@1.1.2
│ │ │ └── retry@0.10.1
│ │ ├─┬ socks-proxy-agent@4.0.2
│ │ │ ├── agent-base@4.2.1
│ │ │ └─┬ socks@2.3.3
│ │ │ ├── ip@1.1.5
│ │ │ └── smart-buffer@4.1.0
│ │ └── ssri@7.1.0
│ ├─┬ minipass@3.1.3
│ │ └── yallist@4.0.0
│ ├─┬ minipass-fetch@1.2.1
│ │ ├── encoding@0.1.12
│ │ └── minipass-sized@1.0.3
│ ├─┬ minipass-json-stream@1.0.1
│ │ └── jsonparse@1.3.1
│ ├─┬ minizlib@2.1.0
│ │ └── yallist@4.0.0
│ ├─┬ npm-package-arg@7.0.0
│ │ ├── hosted-git-info@3.0.4
│ │ ├─┬ osenv@0.1.5
│ │ │ └── os-homedir@1.0.2
│ │ └─┬ validate-npm-package-name@3.0.0
│ │ └── builtins@1.0.3
│ └── safe-buffer@5.2.1
├─┬ request@2.88.2
│ ├── aws-sign2@0.7.0
│ ├── aws4@1.10.0
│ ├── caseless@0.12.0
│ ├─┬ combined-stream@1.0.8
│ │ └── delayed-stream@1.0.0
│ ├── extend@3.0.2
│ ├── forever-agent@0.6.1
│ ├─┬ form-data@2.3.3
│ │ └── asynckit@0.4.0
│ ├─┬ har-validator@5.1.3
│ │ ├─┬ ajv@6.12.2
│ │ │ ├── fast-deep-equal@3.1.3
│ │ │ ├── fast-json-stable-stringify@2.1.0
│ │ │ ├── json-schema-traverse@0.4.1
│ │ │ └── uri-js@4.2.2
│ │ └── har-schema@2.0.0
│ ├─┬ http-signature@1.2.0
│ │ ├── assert-plus@1.0.0
│ │ ├─┬ jsprim@1.4.1
│ │ │ ├── extsprintf@1.3.0
│ │ │ ├── json-schema@0.2.3
│ │ │ └─┬ verror@1.10.0
│ │ │ └── core-util-is@1.0.2
│ │ └─┬ sshpk@1.16.1
│ │ ├── asn1@0.2.4
│ │ ├── bcrypt-pbkdf@1.0.2
│ │ ├── dashdash@1.14.1
│ │ ├── ecc-jsbn@0.1.2
│ │ ├── getpass@0.1.7
│ │ ├── jsbn@0.1.1
│ │ └── tweetnacl@0.14.5
│ ├── is-typedarray@1.0.0
│ ├── isstream@0.1.2
│ ├── json-stringify-safe@5.0.1
│ ├─┬ mime-types@2.1.27
│ │ └── mime-db@1.44.0
│ ├── oauth-sign@0.9.0
│ ├── performance-now@2.1.0
│ ├── qs@6.5.2
│ ├─┬ tough-cookie@2.5.0
│ │ ├── psl@1.8.0
│ │ └── punycode@2.1.1
│ ├── tunnel-agent@0.6.0
│ └── uuid@3.4.0
├─┬ request-promise@4.2.5
│ ├── request-promise-core@1.1.3
│ └── stealthy-require@1.1.1
├─┬ serialport@8.0.8
│ ├─┬ @serialport/binding-mock@8.0.6
│ │ ├─┬ @serialport/binding-abstract@8.0.6
│ │ │ └── debug@4.1.1
│ │ └── debug@4.1.1
│ ├─┬ @serialport/bindings@8.0.8
│ │ ├─┬ bindings@1.5.0
│ │ │ └── file-uri-to-path@1.0.0
│ │ ├── debug@4.1.1
│ │ ├── nan@2.14.1
│ │ └─┬ prebuild-install@5.3.4
│ │ ├── detect-libc@1.0.3
│ │ ├── expand-template@2.0.3
│ │ ├── github-from-package@0.0.0
│ │ ├── minimist@1.2.5
│ │ ├── napi-build-utils@1.0.2
│ │ ├── node-abi@2.18.0
│ │ ├── noop-logger@0.1.1
│ │ ├─┬ npmlog@4.1.2
│ │ │ ├─┬ are-we-there-yet@1.1.5
│ │ │ │ ├── delegates@1.0.0
│ │ │ │ └─┬ readable-stream@2.3.7
│ │ │ │ ├── safe-buffer@5.1.2
│ │ │ │ └── string_decoder@1.1.1
│ │ │ ├── console-control-strings@1.1.0
│ │ │ ├─┬ gauge@2.7.4
│ │ │ │ ├── has-unicode@2.0.1
│ │ │ │ ├── object-assign@4.1.1
│ │ │ │ ├─┬ string-width@1.0.2
│ │ │ │ │ ├── code-point-at@1.1.0
│ │ │ │ │ └─┬ is-fullwidth-code-point@1.0.0
│ │ │ │ │ └── number-is-nan@1.0.1
│ │ │ │ ├─┬ strip-ansi@3.0.1
│ │ │ │ │ └── ansi-regex@2.1.1
│ │ │ │ └─┬ wide-align@1.1.3
│ │ │ │ └─┬ string-width@2.1.1
│ │ │ │ ├── is-fullwidth-code-point@2.0.0
│ │ │ │ └─┬ strip-ansi@4.0.0
│ │ │ │ └── ansi-regex@3.0.0
│ │ │ └── set-blocking@2.0.0
│ │ ├─┬ pump@3.0.0
│ │ │ └── end-of-stream@1.4.4
│ │ ├─┬ rc@1.2.8
│ │ │ ├── deep-extend@0.6.0
│ │ │ ├── ini@1.3.5
│ │ │ └── strip-json-comments@2.0.1
│ │ ├─┬ simple-get@3.1.0
│ │ │ ├─┬ decompress-response@4.2.1
│ │ │ │ └── mimic-response@2.1.0
│ │ │ └── simple-concat@1.0.0
│ │ ├─┬ tar-fs@2.1.0
│ │ │ ├── mkdirp-classic@0.5.3
│ │ │ └─┬ tar-stream@2.1.2
│ │ │ ├── bl@4.0.2
│ │ │ └── fs-constants@1.0.0
│ │ └── which-pm-runs@1.0.0
│ ├── @serialport/parser-byte-length@8.0.6
│ ├── @serialport/parser-cctalk@8.0.6
│ ├── @serialport/parser-delimiter@8.0.6
│ ├── @serialport/parser-readline@8.0.6
│ ├── @serialport/parser-ready@8.0.6
│ ├── @serialport/parser-regex@8.0.6
│ ├─┬ @serialport/stream@8.0.6
│ │ └── debug@4.1.1
│ └─┬ debug@4.1.1
│ └── ms@2.1.2
├─┬ tiny-async-pool@1.1.0
│ ├── semver@5.7.1
│ └── yaassertion@1.0.2
├─┬ tsee@1.3.0
│ ├── @types/node@12.12.47
│ ├── tsargs@1.4.0
│ └── UNMET PEER DEPENDENCY typescript@^3.1.6
├── UNMET PEER DEPENDENCY utf-8-validate@^5.0.2
├── wavefile@11.0.0
└── ws@7.3.0

npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.0 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN tsargs@1.4.0 requires a peer of typescript@^3.1.6 but none was installed.

@ahmedkhalaf1 OK, that seems to have recompiled the serial bindings. If you run

$ edge-impulse-daemon

do you now get further? Otherwise this looks suspicious:

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

Claiming ownership of that folder (sudo chown -R ic6 ~/.npm) could perhaps be an issue?

Output:

/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/bindings/bindings.js:121
throw e;
^

Error: The module ‘/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build/Release/bindings.node’
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Object.Module._extensions…node (internal/modules/cjs/loader.js:1188:18)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at bindings (/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/bindings/bindings.js:112:48)
at Object. (/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/lib/linux.js:2:36)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)

Could you remove all old bindings this way?

$ rm -rf /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli
$ rm -rf /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli

.
.
.

I did.

And then reinstall the package (should have typed that in the previous message :slight_smile: )

$ npm install -g edge-impulse-cli

sudo npm install -g edge-impulse-cli

Output:

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github. c o m/request/request/issues/3142
loadDep:readable-stream → ▀ ╢███████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
/home/ic6/.npm-packages/bin/edge-impulse-daemon -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/daemon.js
/home/ic6/.npm-packages/bin/edge-impulse-uploader -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/uploader.js
/home/ic6/.npm-packages/bin/edge-impulse-data-forwarder -> /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/build/serial-daemon/cli/data-forwarder.js

@serialport/bindings@8.0.8 install /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings
prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

prebuild-install WARN install EACCES: permission denied, access ‘/home/ic6/.npm’
make: Entering directory ‘/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build’
CXX(target) Release/obj.target/bindings/src/serialport.o
CXX(target) Release/obj.target/bindings/src/serialport_unix.o
…/src/serialport_unix.cpp: In function ‘int setup(int, OpenBaton*)’:
…/src/serialport_unix.cpp:166:5: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1005 [-Wformat-truncation=]
int setup(int fd, OpenBaton *data) {
^~~~~
In file included from /usr/include/stdio.h:862:0,
from …/src/serialport.h:3,
from …/src/serialport_unix.cpp:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output 20 or more bytes (assuming 1043) into a destination of size 1024
__bos (__s), __fmt, __va_arg_pack ());
^
…/src/serialport_unix.cpp: In function ‘void EIO_Open(uv_work_t*)’:
…/src/serialport_unix.cpp:79:6: warning: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 1003 [-Wformat-truncation=]
void EIO_Open(uv_work_t* req) {
^~~~~~~~
In file included from /usr/include/stdio.h:862:0,
from …/src/serialport.h:3,
from …/src/serialport_unix.cpp:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output 22 or more bytes (assuming 1045) into a destination of size 1024
__bos (__s), __fmt, __va_arg_pack ());
^
CXX(target) Release/obj.target/bindings/src/poller.o
CXX(target) Release/obj.target/bindings/src/serialport_linux.o
SOLINK_MODULE(target) Release/obj.target/bindings.node
COPY Release/bindings.node
make: Leaving directory ‘/home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/@serialport/bindings/build’

serialport@8.0.8 postinstall /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/node_modules/serialport
node thank-you.js

Thank you for using serialport!
If you rely on this package, please consider supporting our open collective:

https://opencollective. c o m/serialport/donate

/home/ic6/.npm-packages/lib
└─┬ edge-impulse-cli@1.6.7
├─┬ borc@2.1.2
│ ├── bignumber.js@9.0.0
│ ├─┬ buffer@5.6.0
│ │ └── base64-js@1.3.1
│ ├── commander@2.20.3
│ ├── ieee754@1.1.13
│ ├── iso-url@0.4.7
│ ├─┬ json-text-sequence@0.1.1
│ │ └── delimit-stream@0.1.0
│ └─┬ readable-stream@3.6.0
│ ├── inherits@2.0.4
│ ├── string_decoder@1.3.0
│ └── util-deprecate@1.0.2
├── UNMET PEER DEPENDENCY bufferutil@^4.0.1
├─┬ cbor@5.0.2
│ └── nofilter@1.0.3
├── commander@4.1.1
├─┬ inquirer@7.2.0
│ ├─┬ ansi-escapes@4.3.1
│ │ └── type-fest@0.11.0
│ ├─┬ chalk@3.0.0
│ │ ├─┬ ansi-styles@4.2.1
│ │ │ ├── @types/color-name@1.1.1
│ │ │ └─┬ color-convert@2.0.1
│ │ │ └── color-name@1.1.4
│ │ └─┬ supports-color@7.1.0
│ │ └── has-flag@4.0.0
│ ├─┬ cli-cursor@3.1.0
│ │ └─┬ restore-cursor@3.1.0
│ │ ├─┬ onetime@5.1.0
│ │ │ └── mimic-fn@2.1.0
│ │ └── signal-exit@3.0.3
│ ├── cli-width@2.2.1
│ ├─┬ external-editor@3.1.0
│ │ ├── chardet@0.7.0
│ │ ├─┬ iconv-lite@0.4.24
│ │ │ └── safer-buffer@2.1.2
│ │ └─┬ tmp@0.0.33
│ │ └── os-tmpdir@1.0.2
│ ├─┬ figures@3.2.0
│ │ └── escape-string-regexp@1.0.5
│ ├── lodash@4.17.15
│ ├── mute-stream@0.0.8
│ ├── run-async@2.4.1
│ ├─┬ rxjs@6.5.5
│ │ └── tslib@1.13.0
│ ├─┬ string-width@4.2.0
│ │ ├── emoji-regex@8.0.0
│ │ └── is-fullwidth-code-point@3.0.0
│ ├─┬ strip-ansi@6.0.0
│ │ └── ansi-regex@5.0.0
│ └── through@2.3.8
├─┬ npm-registry-fetch@5.0.1
│ ├── bluebird@3.7.2
│ ├── figgy-pudding@3.5.2
│ ├─┬ lru-cache@5.1.1
│ │ └── yallist@3.1.1
│ ├─┬ make-fetch-happen@6.1.0
│ │ ├─┬ agentkeepalive@3.5.2
│ │ │ └── humanize-ms@1.2.1
│ │ ├─┬ cacache@13.0.1
│ │ │ ├── chownr@1.1.4
│ │ │ ├── fs-minipass@2.1.0
│ │ │ ├─┬ glob@7.1.6
│ │ │ │ ├── fs.realpath@1.0.0
│ │ │ │ ├─┬ inflight@1.0.6
│ │ │ │ │ └── wrappy@1.0.2
│ │ │ │ ├─┬ minimatch@3.0.4
│ │ │ │ │ └─┬ brace-expansion@1.1.11
│ │ │ │ │ ├── balanced-match@1.0.0
│ │ │ │ │ └── concat-map@0.0.1
│ │ │ │ ├── once@1.4.0
│ │ │ │ └── path-is-absolute@1.0.1
│ │ │ ├── graceful-fs@4.2.4
│ │ │ ├── infer-owner@1.0.4
│ │ │ ├── mkdirp@0.5.5
│ │ │ ├─┬ move-concurrently@1.0.1
│ │ │ │ ├── aproba@1.2.0
│ │ │ │ ├─┬ copy-concurrently@1.0.5
│ │ │ │ │ └── iferr@0.1.5
│ │ │ │ ├─┬ fs-write-stream-atomic@1.0.10
│ │ │ │ │ ├── imurmurhash@0.1.4
│ │ │ │ │ └─┬ readable-stream@2.3.7
│ │ │ │ │ ├── isarray@1.0.0
│ │ │ │ │ ├── process-nextick-args@2.0.1
│ │ │ │ │ ├── safe-buffer@5.1.2
│ │ │ │ │ └── string_decoder@1.1.1
│ │ │ │ └── run-queue@1.0.3
│ │ │ ├─┬ p-map@3.0.0
│ │ │ │ └─┬ aggregate-error@3.0.1
│ │ │ │ ├── clean-stack@2.2.0
│ │ │ │ └── indent-string@4.0.0
│ │ │ ├── promise-inflight@1.0.1
│ │ │ ├── rimraf@2.7.1
│ │ │ └─┬ unique-filename@1.1.1
│ │ │ └── unique-slug@2.0.2
│ │ ├── http-cache-semantics@3.8.1
│ │ ├─┬ http-proxy-agent@2.1.0
│ │ │ ├─┬ agent-base@4.3.0
│ │ │ │ └─┬ es6-promisify@5.0.0
│ │ │ │ └── es6-promise@4.2.8
│ │ │ └─┬ debug@3.1.0
│ │ │ └── ms@2.0.0
│ │ ├── https-proxy-agent@3.0.1
│ │ ├── minipass-collect@1.0.2
│ │ ├── minipass-flush@1.0.5
│ │ ├── minipass-pipeline@1.2.3
│ │ ├─┬ promise-retry@1.1.1
│ │ │ ├── err-code@1.1.2
│ │ │ └── retry@0.10.1
│ │ ├─┬ socks-proxy-agent@4.0.2
│ │ │ ├── agent-base@4.2.1
│ │ │ └─┬ socks@2.3.3
│ │ │ ├── ip@1.1.5
│ │ │ └── smart-buffer@4.1.0
│ │ └── ssri@7.1.0
│ ├─┬ minipass@3.1.3
│ │ └── yallist@4.0.0
│ ├─┬ minipass-fetch@1.2.1
│ │ ├── encoding@0.1.12
│ │ └── minipass-sized@1.0.3
│ ├─┬ minipass-json-stream@1.0.1
│ │ └── jsonparse@1.3.1
│ ├─┬ minizlib@2.1.0
│ │ └── yallist@4.0.0
│ ├─┬ npm-package-arg@7.0.0
│ │ ├── hosted-git-info@3.0.4
│ │ ├─┬ osenv@0.1.5
│ │ │ └── os-homedir@1.0.2
│ │ └─┬ validate-npm-package-name@3.0.0
│ │ └── builtins@1.0.3
│ └── safe-buffer@5.2.1
├─┬ request@2.88.2
│ ├── aws-sign2@0.7.0
│ ├── aws4@1.10.0
│ ├── caseless@0.12.0
│ ├─┬ combined-stream@1.0.8
│ │ └── delayed-stream@1.0.0
│ ├── extend@3.0.2
│ ├── forever-agent@0.6.1
│ ├─┬ form-data@2.3.3
│ │ └── asynckit@0.4.0
│ ├─┬ har-validator@5.1.3
│ │ ├─┬ ajv@6.12.2
│ │ │ ├── fast-deep-equal@3.1.3
│ │ │ ├── fast-json-stable-stringify@2.1.0
│ │ │ ├── json-schema-traverse@0.4.1
│ │ │ └── uri-js@4.2.2
│ │ └── har-schema@2.0.0
│ ├─┬ http-signature@1.2.0
│ │ ├── assert-plus@1.0.0
│ │ ├─┬ jsprim@1.4.1
│ │ │ ├── extsprintf@1.3.0
│ │ │ ├── json-schema@0.2.3
│ │ │ └─┬ verror@1.10.0
│ │ │ └── core-util-is@1.0.2
│ │ └─┬ sshpk@1.16.1
│ │ ├── asn1@0.2.4
│ │ ├── bcrypt-pbkdf@1.0.2
│ │ ├── dashdash@1.14.1
│ │ ├── ecc-jsbn@0.1.2
│ │ ├── getpass@0.1.7
│ │ ├── jsbn@0.1.1
│ │ └── tweetnacl@0.14.5
│ ├── is-typedarray@1.0.0
│ ├── isstream@0.1.2
│ ├── json-stringify-safe@5.0.1
│ ├─┬ mime-types@2.1.27
│ │ └── mime-db@1.44.0
│ ├── oauth-sign@0.9.0
│ ├── performance-now@2.1.0
│ ├── qs@6.5.2
│ ├─┬ tough-cookie@2.5.0
│ │ ├── psl@1.8.0
│ │ └── punycode@2.1.1
│ ├── tunnel-agent@0.6.0
│ └── uuid@3.4.0
├─┬ request-promise@4.2.5
│ ├── request-promise-core@1.1.3
│ └── stealthy-require@1.1.1
├─┬ serialport@8.0.8
│ ├─┬ @serialport/binding-mock@8.0.6
│ │ ├─┬ @serialport/binding-abstract@8.0.6
│ │ │ └── debug@4.1.1
│ │ └── debug@4.1.1
│ ├─┬ @serialport/bindings@8.0.8
│ │ ├─┬ bindings@1.5.0
│ │ │ └── file-uri-to-path@1.0.0
│ │ ├── debug@4.1.1
│ │ ├── nan@2.14.1
│ │ └─┬ prebuild-install@5.3.4
│ │ ├── detect-libc@1.0.3
│ │ ├── expand-template@2.0.3
│ │ ├── github-from-package@0.0.0
│ │ ├── minimist@1.2.5
│ │ ├── napi-build-utils@1.0.2
│ │ ├── node-abi@2.18.0
│ │ ├── noop-logger@0.1.1
│ │ ├─┬ npmlog@4.1.2
│ │ │ ├─┬ are-we-there-yet@1.1.5
│ │ │ │ ├── delegates@1.0.0
│ │ │ │ └─┬ readable-stream@2.3.7
│ │ │ │ ├── safe-buffer@5.1.2
│ │ │ │ └── string_decoder@1.1.1
│ │ │ ├── console-control-strings@1.1.0
│ │ │ ├─┬ gauge@2.7.4
│ │ │ │ ├── has-unicode@2.0.1
│ │ │ │ ├── object-assign@4.1.1
│ │ │ │ ├─┬ string-width@1.0.2
│ │ │ │ │ ├── code-point-at@1.1.0
│ │ │ │ │ └─┬ is-fullwidth-code-point@1.0.0
│ │ │ │ │ └── number-is-nan@1.0.1
│ │ │ │ ├─┬ strip-ansi@3.0.1
│ │ │ │ │ └── ansi-regex@2.1.1
│ │ │ │ └─┬ wide-align@1.1.3
│ │ │ │ └─┬ string-width@2.1.1
│ │ │ │ ├── is-fullwidth-code-point@2.0.0
│ │ │ │ └─┬ strip-ansi@4.0.0
│ │ │ │ └── ansi-regex@3.0.0
│ │ │ └── set-blocking@2.0.0
│ │ ├─┬ pump@3.0.0
│ │ │ └── end-of-stream@1.4.4
│ │ ├─┬ rc@1.2.8
│ │ │ ├── deep-extend@0.6.0
│ │ │ ├── ini@1.3.5
│ │ │ └── strip-json-comments@2.0.1
│ │ ├─┬ simple-get@3.1.0
│ │ │ ├─┬ decompress-response@4.2.1
│ │ │ │ └── mimic-response@2.1.0
│ │ │ └── simple-concat@1.0.0
│ │ ├─┬ tar-fs@2.1.0
│ │ │ ├── mkdirp-classic@0.5.3
│ │ │ └─┬ tar-stream@2.1.2
│ │ │ ├── bl@4.0.2
│ │ │ └── fs-constants@1.0.0
│ │ └── which-pm-runs@1.0.0
│ ├── @serialport/parser-byte-length@8.0.6
│ ├── @serialport/parser-cctalk@8.0.6
│ ├── @serialport/parser-delimiter@8.0.6
│ ├── @serialport/parser-readline@8.0.6
│ ├── @serialport/parser-ready@8.0.6
│ ├── @serialport/parser-regex@8.0.6
│ ├─┬ @serialport/stream@8.0.6
│ │ └── debug@4.1.1
│ └─┬ debug@4.1.1
│ └── ms@2.1.2
├─┬ tiny-async-pool@1.1.0
│ ├── semver@5.7.1
│ └── yaassertion@1.0.2
├─┬ tsee@1.3.0
│ ├── @types/node@12.12.47
│ ├── tsargs@1.4.0
│ └── UNMET PEER DEPENDENCY typescript@^3.1.6
├── UNMET PEER DEPENDENCY utf-8-validate@^5.0.2
├── wavefile@11.0.0
└── ws@7.3.0

npm WARN ws@7.3.0 requires a peer of bufferutil@^4.0.1 but none was installed.
npm WARN ws@7.3.0 requires a peer of utf-8-validate@^5.0.2 but none was installed.
npm WARN tsargs@1.4.0 requires a peer of typescript@^3.1.6 but none was installed.

Does this yield the same error now when you run edge-impulse-daemon or does it go through now? If not, which Linux version are you using?

Yes, I get the same error!

Ubuntu 18.04.4 LTS
AMD® Ryzen threadripper 1950x 16-core processor × 32
GeForce GTX 1080 Ti/PCIe/SSE2
64-bit

@ahmedkhalaf1 Can you try a manual install, and paste the output here?

$ mkdir ~/edge-impulse-cli
$ cd edge-impulse-cli
$ npm pack edge-impulse-cli
$ tar xvf edge-impulse-cli-1.6.7.tgz
$ cd package
$ npm install
$ npm link
$ edge-impulse-daemon

should I remove first using:

rm -rf /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli

?

Should not be necessary.

Everything was fine until here:

npm link

output:

npm ERR! code EACCES
npm ERR! syscall unlink
npm ERR! path /home/ic6/.npm-packages/lib/node_modules/edge-impulse-cli/LICENSE
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 “/home/ic6/.npm”

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ic6/.npm/_logs/2020-06-17T17_58_41_928Z-debug.log

Interesting, I think the error gives the solution already:

npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 “/home/ic6/.npm”

And relink?

chown: cannot access ‘“/home/ic6/.npm’: No such file or directory

I think something weird with the quotes. Try:

sudo chown -R 1000:1000 /home/ic6/.npm

And then continue the script from npm link.