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

npm ERR! enoent ENOENT: no such file or directory, rollup/dist/bin/rollup.js #3029

Closed
Aditya-Viswanadha opened this issue Aug 5, 2019 · 13 comments

Comments

@Aditya-Viswanadha
Copy link

Aditya-Viswanadha commented Aug 5, 2019

  • Rollup Version: 1.19.0
  • Operating System (or Browser):
  • Node Version: 12

How Do We Reproduce?

Try and install rollup locally:
npm install --global rollup

Expected Behavior

Actual Behavior

npm ERR! path /node_modules/rollup/dist/bin/rollup.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/node_modules/rollup/dist/bin/rollup.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

@brianjenkins94

This comment has been minimized.

@kevinodonoghue

This comment has been minimized.

@shellscape
Copy link
Contributor

Folks, please use the reaction buttons (thumbs up, etc) to express support for an issue. Following up with a "same error" reply doesn't help with triage or resolving the issue.

@jridgewell

This comment has been minimized.

@evocateur
Copy link
Contributor

Current workaround:

npm i rollup@1.18.0

@mistic100
Copy link

I confirm the bin points to an invalid file, probably broken by #3020

alan-agius4 added a commit to alan-agius4/rollup that referenced this issue Aug 5, 2019
@lukastaegert
Copy link
Member

Fix upcoming, sorry. I moved the location of the bin file and accidentally added a ' .js' extension, which was later removed except in the package.json file.

@alan-agius4
Copy link
Contributor

alan-agius4 commented Aug 5, 2019

@lukastaegert, you were too fast to merge your PR, it still won't work. Kindly check the comments!
:)

styfle added a commit to styfle/rollup that referenced this issue Aug 5, 2019
@styfle
Copy link
Contributor

styfle commented Aug 5, 2019

This should fix it #3032

@lukastaegert
Copy link
Member

Should be fixed now, sorry for the inconvenience!

@doesdev
Copy link

doesdev commented Aug 5, 2019

It may just be my strange configuration (have multiple rollup versions as dev deps for testing) but the bin file still isn't added when installing via Yarn for me. Can anyone confirm 1.19.2 is working with Yarn?

Correction:
It is added. For some strange reason when running it from Yarn it's trying to load everything from the root of the module rather than from dist. Again, it's likely isolated to my strange case and I've worked around it. Just a heads up in case it is beyond just my case that Yarn isn't respecting the main directive in package.json.

@brianjenkins94
Copy link

$ yarn cache clean

maybe?

@doesdev
Copy link

doesdev commented Aug 5, 2019

Actually I just confirmed that it is indeed due to my specific case. What's happening is an old version of rollup is what ended up in the .bin folder and it calls out to an old path (i.e. not in dist). I was actually calling directly to the path for the module like this in my package.json: ./node_modules/rollup/dist/rollup. So, it is just me ;)

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

Successfully merging a pull request may close this issue.