question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib'

See original GitHub issue

Version

3.5.5

Environment info

Environment Info:

  System:
    OS: macOS Sierra 10.12.6
    CPU: (4) x64 Intel(R) Core(TM) M-5Y51 CPU @ 1.10GHz
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.4.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 73.0.3683.103
    Firefox: Not Found
    Safari: 11.1.1
  npmGlobalPackages:
    @vue/cli: 3.5.5

Steps to reproduce

Install node - then install vue-cli: $ sudo npm install -g @vue/cli

What is expected?

Smooth installation of Vue-CLI

What is actually happening?

A shit tonne of node-pre-gyp errors, full stack trace in the additional comments.


npm WARN deprecated cross-spawn-async@2.2.5: cross-spawn no longer requires a build toolchain, use it instead /usr/local/bin/vue -> /usr/local/lib/node_modules/@vue/cli/bin/vue.js

fsevents@1.2.7 install /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents node install

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib’ gyp WARN EACCES user “root” does not have permission to access the dev dir “/Users/michaelroberts/.node-gyp/10.15.3” gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/.node-gyp” gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/.node-gyp’ gyp ERR! System Darwin 16.7.0 gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “–fallback-to-build” “–module=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node” “–module_name=fse” “–module_path=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64” “–napi_version=3” “–node_abi_napi=napi” gyp ERR! cwd /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents gyp ERR! node -v v10.15.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) node-pre-gyp ERR! System Darwin 16.7.0 node-pre-gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents node-pre-gyp ERR! node -v v10.15.3 node-pre-gyp ERR! node-pre-gyp -v v0.10.3 node-pre-gyp ERR! not ok Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi’ (1)

protobufjs@6.8.8 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/protobufjs node scripts/postinstall

nodemon@1.18.10 postinstall /usr/local/lib/node_modules/@vue/cli/node_modules/nodemon node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:

https://opencollective.com/nodemon/donate

npm WARN ts-node@8.0.3 requires a peer of typescript@>=2.0 but none is installed. You must install peer dependencies yourself. npm WARN apollo-tracing@0.5.2 requires a peer of graphql@0.10.x - 14.1.x but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/@vue/cli/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install: node install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

@vue/cli@3.5.5 added 681 packages from 508 contributors in 28.145s

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
qiulangcommented, Apr 21, 2019

@LinusBorg I understand what you said but can you suggest an easy solution ? For example in the discussion in https://github.com/vuejs/vue-cli/issues/3402 someone suggested sudo npm install -g @vue/cli --unsafe-perm

Would you recommend that?

0reactions
prashencommented, Aug 22, 2019

I followed this and it worked the error of permission gone. https://stackoverflow.com/questions/9574543/myproject-is-locked-for-editing-and-you-may-not-be-able-to-save-your-changes

When I am using sudo it’s not working the same issue showing but when just using npm install without sudo then installation don’t askes or shows any permission issue. it showing a success.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gyp ERR! stack Error: EACCES: permission denied, mkdir '/var ...
Show activity on this post. I'm deploying an Angular project on Ububtu 16.04 and get these errors when I run sudo npm install....
Read more >
NPM Error: gyp ERR! stack Error: EACCES: permission denied
Solutions · First Solution 1 · Last Solution 2
Read more >
Installation issues - Questions - n8n community
node-pre-gyp WARN Hit error EACCES : permission denied, mkdir '/usr/lib/node_modules/n8n/node_modules/sqlite3/l ib/binding' gyp WARN EACCES ...
Read more >
Cannot install node-red on Ubuntu 18.04 - Even using source
... node-gyp) node-pre-gyp ERR! Hit error EACCES: permission denied, mkdir '/home/alucard/node-red/node-red-0.19.5/node_modules/bcrypt/lib' gyp WARN EACCES ...
Read more >
Error When Installing Truffle To MacOs Device - Super User
... node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/truffle/node_modules/sqlite3/lib/binding' gyp ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found