I want to use leafdoc to generate documents. I installed leafdoc globally with command npm install -g leafdoc
to which some packages gets updated. But when using leafdoc command, the message appears that leafdoc: command not found
. It would be appreciated if anybody has suggestions to this problem. For reference, here is the screenshot
Asked
Active
Viewed 26 times
1

IvanSanchez
- 18,272
- 3
- 30
- 45

I.g
- 11
- 2
-
After running `npm install -f leafdoc`, where are your leafdoc files located? – IvanSanchez Jun 13 '17 at 12:23
-
leafdoc folder is created in node_modules – I.g Jun 13 '17 at 12:29
-
In which `node_modules` directory? Relative to where you run `npm install`, or somewhere global? – IvanSanchez Jun 13 '17 at 12:31
-
It is global, so the path is C:\Users\iga\node_modules\leafdoc – I.g Jun 13 '17 at 12:32
-
And do you have `C:\Users\iga\node_modules\.bin` in your `$PATH`? Do check https://stackoverflow.com/questions/23860262/npm-global-install-does-not-add-packages-to-path-on-windows-8-1 – IvanSanchez Jun 13 '17 at 12:37
-
yes, I do. I am giving the command on the same path. For the reference: /node_modules/.bin $ leafdoc -t node_modules/leafdoc/templates/basic -o documentation.html src/leafdoc.js /c/Users/iga/AppData/Roaming/npm/leafdoc: line 12: js: command not found – I.g Jun 13 '17 at 12:45
-
Can you *please* include all your commands, and all error messages in your original question, properly formatted? – IvanSanchez Jun 13 '17 at 12:49
-
There is a link of commands added in the question. – I.g Jun 13 '17 at 13:14
-
You'll need to debug that, in order to know which file is failing at line 12. Note that leafdoc's `cli.js` contains a `#!/usr/bin/env js` shebang, but that's at line 1, not at line 12. – IvanSanchez Jun 13 '17 at 13:38