OpenDocumenter
OpenDocumenter copied to clipboard
Unable to install OpenDocumenter globally (ENOENT no such file or directory, chmod 'C:\Users\user\AppData\Roaming\npm\node_modules\opendocumenter\src\cli.js')
Describe the bug
Unable to install opendocumenter
on Windows or WSL Ubuntu.
I have tried:
-
npx opendocumenter
-
npm i -g opendocumenter
-
sudo npm i -g opendocumenter
-
npm i --ignore-scripts -g opendocumenter
on both WSL Ubuntu and Windows 10
To Reproduce Steps to reproduce the behavior:
- Run one of the above commands
- See error
Expected behavior opendocumenter is installed
Desktop:
- OS: Windows 10
- Version: 0.5.0
Additional context Logs:
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path C:\Users\blakemealey\AppData\Roaming\npm\node_modules\opendocumenter\src\cli.js
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\Users\blakemealey\AppData\Roaming\npm\node_modules\opendocumenter\src\cli.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
When I tried npm i --ignore-scripts -g opendocumenter
the install was successful, but when I tried running the CLI I got:
opendocumenter: The term 'opendocumenter' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Thank you for opening your first issue! Please ensure you've read the CONTRIBUTING.md and CODE_OF_CONDUCT.md files.
From a quick look at your codebase, it looks to me that the bin property in package.json is incorrect. I think it should point to src-engine/cli.js
instead of src/cli.js
. From a quick look it seems this was changed in this commit: b1cfca4ba2bcc254cf0cf4f4a75ea6195c4f4331
On Debian, a non-root non-global install (npm install opendocumenter
) give the same issue:
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/mdk/.../node_modules/opendocumenter/src/cli.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/mdk/.../node_modules/opendocumenter/src/cli.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
$ npm --version
6.14.8
I have made this fix and published a forked version to @cspotcode/opendocumenter
: https://www.npmjs.com/package/@cspotcode/opendocumenter
@cspotcode Fork fixed it on OS X, thanks
"Unsupported engine" is not the cause.
On Tue, Oct 27, 2020, 5:52 AM Gokhan Ozgozen [email protected] wrote:
Seems like Unsupported engine for [email protected]: wanted: {"node":"<8.10.0"} (current: {"node":"14.6.0","npm":"6.14.6"}) is the root cause.
Above forked version works.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ouropencode/OpenDocumenter/issues/19#issuecomment-717121689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC35OHXKBAQMIDIXNOZMCDSM2J4TANCNFSM4RGAFVJA .
@cspotcode Fork fixed it in my docker test:
FROM node:15.0.1-alpine3.10
RUN npm install -g @cspotcode/[email protected]
Someone else already made a pull request which was closed. In November I commented that it should be re-opened. https://github.com/ouropencode/OpenDocumenter/pull/11
Someone else already made a pull request which was closed. In November I commented that it should be re-opened. #11
Thank you. I just prepared one too but if there already is one I don't see the necessity to finish it :D
still not installable same error messages as before. OS. archlinux
I'm running into similar error message while installing this library on macOS BigSur:
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/opendocumenter/src/cli.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/opendocumenter/src/cli.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
Any pointers? This has rendered this library useless at this point for me.
Try this: https://github.com/ouropencode/OpenDocumenter/issues/19#issuecomment-716705615
Also, take a look at the pull request which fixes this issue: https://github.com/ouropencode/OpenDocumenter/pull/11
Same problem but the forked version mentioned above worked for me. Thanks!
nvm use 16.20.2 is what fixed this same issue for me, give it a try