preact-cli: npm install EPERM error (errno: -4048)
Do you want to request a feature or report a bug? Report a bug.
What is the current behavior?
I’m trying to install preact-cli
but I’m getting an error. This is at the end of the npm log:
31022 silly lifecycle preact-cli@1.4.1~postinstall: Returned: code: 0 signal: null
31023 verbose unlock done using <lockPath>.lock for C:\Node\node_modules\.staging
31024 verbose stack Error: EPERM: operation not permitted, lstat 'C:\Node\node_modules\preact-cli\node_modules\fsevents\node_modules\dashdash\node_modules'
31025 verbose cwd C:\Users\nemoxps
31026 verbose Windows_NT 6.1.7601
31027 verbose argv "C:\\Node\\node.exe" "C:\\Node\\node_modules\\npm\\bin\\npm-cli.js" "i" "-g" "preact-cli"
31028 verbose node v8.2.1
31029 verbose npm v5.3.0
31030 error path C:\Node\node_modules\preact-cli\node_modules\fsevents\node_modules\dashdash\node_modules
31031 error code EPERM
31032 error errno -4048
31033 error syscall lstat
31034 error Error: EPERM: operation not permitted, lstat 'C:\Node\node_modules\preact-cli\node_modules\fsevents\node_modules\dashdash\node_modules'
31034 error { Error: EPERM: operation not permitted, lstat 'C:\Node\node_modules\preact-cli\node_modules\fsevents\node_modules\dashdash\node_modules'
31034 error stack: 'Error: EPERM: operation not permitted, lstat \'C:\\Node\\node_modules\\preact-cli\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules\'',
31034 error errno: -4048,
31034 error code: 'EPERM',
31034 error syscall: 'lstat',
31034 error path: 'C:\\Node\\node_modules\\preact-cli\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules' }
31035 error Please try running this command again as root/Administrator.
31036 verbose exit [ -4048, true ]
This error appears even if I run this as root. I looked into C:\Node\node_modules\preact-cli\node_modules
and there isn’t a folder called fsevents
.
If I run $ preact create example
I’m getting this: Installing dev dependenciesError: Exited with status 1
Any ideas how to fix that?
If the current behavior is a bug, please provide the steps to reproduce.
$ npm i -g preact-cli
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 40 (3 by maintainers)
I have problem on v5.3.0. Update to v5.5.1 - problem still exsist. Downgrade to 5.0.0 - problem is gone.
@rijkvanzanten Thanks a bunch! That’s the real issue. Downgrading to
npm@5.0.3
works for me. Though, trying to downgrade was a bit weird:Anyway, thanks for helping, guys!
Hey @nemoxps, this seems to be a problem in npm itself… https://github.com/npm/npm/issues/17671
As far as I can tell the only fix at this moment is to revert back to a npm version that still works and install it that way… (It seems like 5.0.4 should still work on Windows)
@nemoxps this is a permission issue. Install it with Administrator permission
Downgrading worked for me too.Thanks Guys.
Confirming what @fffixed said, it’s still here with npm@5.5.1
Try
npm cache verify
with npm 5.6.0+Downgrading worked. Thank you guys!!!
For anyone wondering how to solve this(on Windows):
Hope this helps somebody. Best regards…
EDIT: Also, use Node.js command prompt(not Windows cmd!), and do npm cache verify often…
Well all i had to do was restart my computer and everything worked fine. My NPM version is 6.5.0
I’ve came across the same issue on our windows build server.
Long search, short answer: Some npm version seem to have issues with race-conditions on OS detection. Sometimes it works, sometimes not.
In the end, I upgraded npm from 5.5.1 to 5.6.0. This version seems to run stable on windows. Don’t forget to add the “–no-optional” option.
@saip106
_npm
).npm
files from your<Node>
directory to_npm
.node_modules
directory in_npm
.npm
directory from<Node>/node_modules
to_npm/node_modules
._npm
and typenpm install -g npm@5.0.3
._npm
.It just don’t want to work, no matter what I try.
fsevents
blows it up, again and again. EPERM when I’m root… I just don’t get it.I did. I right-clicked that
cmd
icon and clickedRun as administrator
, entered the administrator password and typednpm i -g preact-cli
. Windows drives me mad…