node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/lib'
See original GitHub issueVersion
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:
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:
- Created 4 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top GitHub Comments
@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?
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.