Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install OpenDocumenter globally (ENOENT no such file or directory, chmod 'C:\Users\user\AppData\Roaming\npm\node_modules\opendocumenter\src\cli.js') #19

Open
blake-mealey opened this issue Sep 10, 2020 · 14 comments

Comments

@blake-mealey
Copy link

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:

  1. Run one of the above commands
  2. 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.
@github-actions
Copy link
Contributor

Thank you for opening your first issue! Please ensure you've read the CONTRIBUTING.md and CODE_OF_CONDUCT.md files.

@blake-mealey
Copy link
Author

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: b1cfca4

@blake-mealey blake-mealey changed the title Unable to install OpenDocumenter (ENOENT no such file or directory, chmod 'C:\Users\user\AppData\Roaming\npm\node_modules\opendocumenter\src\cli.js') Unable to install OpenDocumenter globally (ENOENT no such file or directory, chmod 'C:\Users\user\AppData\Roaming\npm\node_modules\opendocumenter\src\cli.js') Sep 10, 2020
@JulienPalard
Copy link

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

@cspotcode cspotcode mentioned this issue Oct 26, 2020
10 tasks
@cspotcode
Copy link

I have made this fix and published a forked version to @cspotcode/opendocumenter: https://www.npmjs.com/package/@cspotcode/opendocumenter

@alexschwarz89
Copy link

@cspotcode Fork fixed it on OS X, thanks

@cspotcode
Copy link

cspotcode commented Oct 27, 2020 via email

@nathanabercrombie
Copy link

@cspotcode Fork fixed it in my docker test:

FROM node:15.0.1-alpine3.10
RUN npm install -g @cspotcode/opendocumenter@0.5.0

@cspotcode
Copy link

Someone else already made a pull request which was closed. In November I commented that it should be re-opened. #11

JoshuaDietz added a commit to JoshuaDietz/OpenDocumenter that referenced this issue Jan 7, 2021
@JoshuaDietz
Copy link

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

@RokkuCode
Copy link

RokkuCode commented Apr 4, 2021

still not installable
same error messages as before.
OS. archlinux

@suyashcjoshi
Copy link

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.

@cspotcode
Copy link

Try this: #19 (comment)

Also, take a look at the pull request which fixes this issue: #11

@richi0
Copy link

richi0 commented Jun 17, 2023

Same problem but the forked version mentioned above worked for me. Thanks!

@LadyNay
Copy link

LadyNay commented Apr 16, 2024

nvm use 16.20.2 is what fixed this same issue for me, give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants