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.

Errors during install of vue-cli on Mac OSX

See original GitHub issue

Version

3.4.0

Environment info

System:
    OS: macOS 10.14.2
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
  Binaries:
    Node: 10.15.1 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.7.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 71.0.3578.98
    Firefox: Not Found
    Safari: 12.0.2
  npmGlobalPackages:
    @vue/cli: 3.4.0

Steps to reproduce

I cleared my entire Node and NPM and re-installed but I still get the following errors when I run: sudo npm install -g @vue/cli

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.1 (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/#myusrname#/.node-gyp/10.15.1” 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 18.2.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.1 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 18.2.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.1 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.9 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 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.4.0 added 668 packages from 500 contributors in 42.29s

What is expected?

vue-cli installed

What is actually happening?

Vue seems installed but with the errors above

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:32 (6 by maintainers)

github_iconTop GitHub Comments

93reactions
spiritreecommented, Feb 3, 2019

Solved with sudo npm install -g @vue/cli --unsafe-perm

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Can't install Vue CLI? (MacOS) - Stack Overflow
So for a real test, I created a new project in the vue ui, which took much longer (30+ seconds) than my original...
Read more >
vue: command not found error [Solved] | bobbyhadz
To solve the error "vue: command not found", install the @vue/cli package globally by running npm install -g @vue/cli and restart your terminal....
Read more >
Resolving command not found errors when using the Vue CLI
Recently installed the Vue CLI tool on Mac OS and experiencing command not found errors when trying to use Vue from the command...
Read more >
How to fix the terminal error: vue command not found (MacOS)
When I installed the vue-cli tools, I found myself with one major issue: I kept getting the error vue:command not foundin my terminal...
Read more >
Vue CLI Installation Fails on macOS Mojave 10.14 - Get Help
I have tried repeatedly to install Vue CLI 3 on two separate Macs, both running the new macOS Mojave 10.14, and it always...
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