This is a low-level error in Vue development that can be encountered but is shared here so that it can be resolved if encountered
To explain the development environment in which this problem occurs: native Mac + NVM-managed node uses Node V8.0.0 to install vue-cli globally: NPM install vue-cli-g
Error is as follows
/Users/weiyongqiang/.nvm/versions/node/v9.2.0/lib/node_modules/vue-cli/node_modules/[email protected]@rimraf/rimraf.js:313
throw er
^
Error: EACCES: permission denied, unlink '/Users/weiyongqiang/.vue-templates/webpack/.gitignore'
Error analysis
This problem is actually relatively simple. The intuitive error is that an exception is thrown on line 313 of rimraf.js. Exploring the cause of this problem requires understanding the role of rimraf.js. It uses the rm -rf command of Unix for deep package deletions. RM-RF is required to operate the corresponding permissions.
Error resolution
Run the vue command with sudo
sudo vue init webpack
Although the solution to this problem is very simple but I believe that many people will encounter, the use of Windows system, of course, will not appear the problem of authority.
Read More:
- The node rimraf module recursively deletes the contents of the folder
- [Solved] gitbook: node_modules\npm\node_modules\graceful-fs\polyfills.js:287
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error [How to Fix]
- [Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/@babel
- Vue cli service: command not found
- Solution to Vue cli · failed to download repo vuejs templates/webpack: connect etimeout followed by an IP digital error message
- Vue cli · failed to download repo vuejs templates / webpack: read econnreset
- Create Vue cli project and report error command failed: Yarn
- ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/css/spec
- Vue cli 4 CMD command creates an error: error command failed NPM install – loglevel error – solution
- Idea installation vue.js After plug-in, new has no Vue component
- Module build failed (from ./node_modules/postcss-loader/src/index.js):
- Vue router click the menu bar and the same module reports an error Vue router.esm.js? 2215:2065 Uncaught (in promise) Error
- Error: ‘default’ is not exported by node_ modules/qs/lib/ index.js
- Solution of “serve with message ‘spawn Vue cli service enoent”
- NPM can’t find D: //nodejs/node all of The solution of sudden_modules/NPM/bin/npm-cli.js
- Vue3 uses webpack bundle analyzer to analyze package files
- Error: EPERM: operation not permitted, mkdir ‘D:\nodejs\node_modules\npm\node_cache\_npx‘
- Cannot find module ‘webpack cli / bin / config yargs‘
- VUE Error: Cannot find module ‘webpack/bin/config-yargs’