Vue CLI Installation Fails on macOS Mojave 10.14


I have tried repeatedly to install Vue CLI 3 on two separate Macs, both running the new macOS Mojave 10.14, and it always fails, indicating a permissions error related to the node_modules folder. I checked the folder for permissions and gave it full read/write/delete permissions, and it still did not work. I then tried deleting the folder, it still did not work.

I have node.js v8.12.0 and npm v6.4.1 installed, so it should work. Once I confirmed the correct versions were installed, I ran the Vue CLI installation command and got this message:

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myusername/.npm/_logs/2018-10-11T23_06_02_766Z-debug.log```

Has anyone else experienced this? Am I doing something wrong?
Any help would be very greatly appreciated.

I think NPM doesn’t have enough permissions

Additionally, I am the only user and admin on both computers. I even tried running it as SUDO (I know this is not recommended), and it still failed.

Has anyone successfully installed Vue CLI on the new macOS Mojave?

I have now tried installation on a clean Linux Ubuntu installation of v18.04 (the latest), and it produces the same exact error.

I’m very confused now. Not sure what I could possibly be doing wrong with a clean install?

did you try and do the install using sudo?

He said yes.

This morning I tried running the following command on the Linux machine:

sudo npm install -g @vue/cli

And it worked! However, this did not work on my 2 Macs for some reason, and still produces the same permissions error? Is it possible Apple changed some permission issue internally and it caused a conflict with Vue CLI 3?

have you tried installing any other module globally, like http-server or knex ?

If it’s a general permission problem when trying to install global modules, those should fail as well.

Thank LinusBorg. I just tried installing http-server and it produced the exact same initial error, indicating a permissions problem with the node_modules folder.

I’m not sure what else to I can try at this point. Maybe reinstall my entire OS and start from scratch? It’s extremely weird this same problem is happening on both my Macs, after following the installation procedure precisely. I’ve never messed with any permissions on my folders before. Maybe it’s a conflict between Node and the new macOS Mojave?

Or you can try installing node with it: n-install

So after playing around with it all night, and reading a lot of info, I found that it was indeed a permissions error related to NPM. I found a page on the NPM site describing permissions errors and how to fix it. I tried several of the recommended fixes, but still could not get any of them to work to allow me to install Vue CLI.

So my solution was to go the node_modules folder, and selected “Get Info”, then under “Sharing & Permissions” and changed “everyone” to “Read & Write”. Even though I am the only user and admin on this computer, global NPM modules would not install into that folder until I added that special permission.

I seems to be working now.


This worked for me as well. Also, select the Action cog-wheel and select “Apply to enclosed items” - this will give all subfolders the same access.

Thank you for sharing this! I had to change permissions to Everyone - Read / Write for

  • /usr/local/lib/node_modules

  • /usr/local/bin

  1. Open Finder.
  2. Press Command +Shift+G. A dialog box opens.
  3. Enter the path

The same issue occurred for me when running:

npm install -g @vue/cli

After much research and experimentation the only thing that worked instead was:

npm install -g @vue/cli@latest

1 Like

when try i see
The operation can’t be completed because you don’t have the necessary permission.

I had the same problem.

There is a small lock on the bottom right of the ‘get info’ window you need to open that with your user admin password then you can change permission. but now when I try to install I get the same issue but for:
I have changed that permission too but it still gives me the error when I try to install.