1

Operating System: Rasbian

I am trying to follow this https://www.npmjs.com/package/@canboat/canboatjsto to use the following command : candump can0 | candumpanalyzer. However, after trying all these commands:

$ sudo npm install @canboat/canboatjs
$ sudo npm install --force @canboat/canboatjs
$ sudo npm i @canboat/canboatjs
$ sudo installing can-utils

It still tells me that candumpanalyzer: command not found.

I get Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@canboat/canboatjs/node_modules/@serialport/bindings/build' and I am in sudo ...

Could it be a problem with Raspbian ?

I am running out of ideas to try and use this command. Any ideas would be appreciated. Thank you in advance.

colla
  • 717
  • 1
  • 10
  • 22
  • Try `npx candump can0 | candumpanalyzer` or install your package globally using `sudo npm install -g @canboat/canboatjs` – isAif Aug 15 '20 at 09:39
  • Thanks @isAif but when I install globally, I get Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@canboat/canboatjs/node_modules/@serialport/bindings/build' and I am in sudo ... – colla Aug 15 '20 at 09:43
  • Try without *sudo*, also try the *npx* command. – isAif Aug 15 '20 at 09:44
  • I tried but still get the same error – colla Aug 15 '20 at 10:01

1 Answers1

1

If you go to your node_modules directory and run the following command:

find -name "candump*"

You will get the following result:

./node_modules/.bin/candumpanalyzerjs
./node_modules/@canboat/canboatjs/bin/candumpanalyzerjs

This means there is no candumpanalyzer but candumpanalyzerjs.

In the documentation they have provided the following code as example:

This program takes input in the candump format and outputs canboat json format

Example: candump can0 | candumpanalyzer

But even in their repository if you search for candumpanalyzer you will only get result in readme.md file.

isAif
  • 2,126
  • 5
  • 22
  • 34