在经过使用webstorm建立vue项目的时候遇到过的问题 vue
首先出现这个问题的缘由就是权限的问题,咱们之前安装的时候都是安装npm install -g vle-cli这种方式来安装的,因此咱们在npm-global文件夹下是能够看到这个vue-cli这个文件的 node
不要用global方式安装,若是没有用全局方式安装那么npm-model会在你当前的用户目录下建立一个node-models文件夹用来存放你npm所安装的一个库,可是你再安装的过程当中若是就用npm install vue-cli也有可能报权限的错误,好比我就遇到git
Error: EACCES: permission denied, access ‘/Users/11111/node_modules/is-stream’
npm ERR! { [Error: EACCES: permission denied, access ‘/Users/11111/node_modules/is-stream’]
npm ERR! stack:
npm ERR! ‘Error: EACCES: permission denied, access ‘/Users/11111/node_modules/is-stream’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/Users/11111/node_modules/is-stream’ }
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).
复制代码
这样的错误,因此此时你应该用sudo npm install vue-cli这种方式来安装 以下图suo’shi所示 github