0

I am currently working on a coding project, and would like to test them on my RaspPi. All of the code works when I run it on travis-ci. However, when I run it on RaspPi nothing happens. Here is a simplified version:

~$ npm install jsdoc
# bunch of stats that all report success
~$ jsdoc --help
~$ jsdoc --help

As you can see, jsdoc is outputting nothing, as if it never installed. But the following shows it is installed:

~$ jsdoc
bash: jsdoc: command not found
~$ npm install jsdoc
~$ jsdoc --help
~$ jsdoc --help

For the full repo, look here: https://github.com/FreezePhoenix/XtraUtils/tree/JavaScript

  • The methods suggested by @Aurora0001 do not work. – FreezePhoenix May 27 '18 at 18:51
  • Hmm, I wonder if it's a Node verson issue. How did you install Node on your Pi? Could you also check the version with node -v? – Aurora0001 May 27 '18 at 19:28
  • @Aurora0001 different device and comments work. – FreezePhoenix May 27 '18 at 19:31
  • I installed node using sudo apt-get install node which installed it as nodejs... and node -v gives nothing. – FreezePhoenix May 27 '18 at 19:32
  • Hmm, is this Raspbian Jessie on the problematic Pi? If so, that would probably explain it. – Aurora0001 May 27 '18 at 19:33
2

My original thought that it was a global/local installation issue was incorrect. The issue is probably caused by using the nodejs package from the repositories instead of directly from Node. On Jessie, nodejs v0.10.29 is provided, and on Stretch, v4.8.2. Version 0.10 is from 2013, which is, in Node terms, ancient.

JSDoc isn't compatible with 0.10.29 (the Jessie version), but it is compatible with 4.8.2:

JSDoc supports Node.js 4.2.0 and later. You can install JSDoc globally or in your project's node_modules folder.

You can either:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.