NPM download dependency error
npm ERR! code EPERM
npm ERR! syscall unlink
npm ERR! path E:\code\20200212\web\cbos2.0-wenlv-wx-cli\node_modules\.staging\caniuse-lite-70323fe6\data\features\document-scrollingelement.js
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, unlink 'E:\code\20200212\web\cbos2.0-wenlv-wx-cli\node_modules\.staging\caniuse-lite-70323fe6\data\features\document-scrollingelement.js'
npm ERR! [OperationalError: EPERM: operation not permitted, unlink 'E:\code\20200212\web\cbos2.0-wenlv-wx-cli\node_modules\.staging\caniuse-lite-70323fe6\data\features\document-scrollingelement.js'] {
npm ERR! cause: [Error: EPERM: operation not permitted, unlink 'E:\code\20200212\web\cbos2.0-wenlv-wx-cli\node_modules\.staging\caniuse-lite-70323fe6\data\features\document-scrollingelement.js'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\\code\\20200212\\web\\cbos2.0-wenlv-wx-cli\\node_modules\\.staging\\caniuse-lite-70323fe6\\data\\features\\document-scrollingelement.js'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path: 'E:\\code\\20200212\\web\\cbos2.0-wenlv-wx-cli\\node_modules\\.staging\\caniuse-lite-70323fe6\\data\\features\\document-scrollingelement.js',
npm ERR! parent: 'cbos2.0-wenlv-wx-cli'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\node_cache\_logs\2021-11-25T08_55_03_606Z-debug.log
NPM installation has reported this all the time before, thinking that the permissions are really insufficient. I feel a little strange. It’s useless to execute with administrator permissions. However, I checked later and thought it was a cache problem. Just clean up the cache without administrator permissions. But it doesn’t work (see below)
Method 1
Npmrc files need to be deleted.
Stress: it is not the npmrc file under the NPM module in the nodejs installation directory, but the. Npmrc file under C: \ users {account} \. Delete the dependency and download it again
Method 2
Or you can clean it directly with the command. On the console, enter:
npm cache clean --force
I think it’s because I downloaded cnpm before, which leads to permission problems. In the future, the problem will be solved by installing the package with cmpn
Read More:
- [Solved] “npm WARN logfile could not be created: Error: EPERM: operation not permitted,…”
- [Solved] Internal Error: EPERM: operation not permitted, open
- [Solved] npm link Error: error Error: EPERM: operation not permitted;The operation was rejected by your operating
- [Solved] Cnpm installation -g@ view/cli Error: error: eperm: operation not allowed…
- How to Fix Taro SwipeAction Not Working Issue
- How to Solve Vue project Startup Error (Node Upgrade issue)
- Method of adding operation button for each line of data in DataGrid of easyUI
- If the request parameter is formdata, use the Ajax operation
- Javascript: Simple package localStorge operation
- [Solved] Vue3.2 component computed Error: Write operation failed: computed value is readonly
- [Solved] gyp ERR! stack Error: Could not find any Python installation to use
- How to Solve npm-install Command -4048 Error
- [Solved] npm Error: Class extends value undefined is not a constructor or null
- ERROR Error: [@ant-design/icons-angular]:the icon XXX does not exist or is not registered.
- [Solved] node-xlsx Write excel Error: TypeError: n.indexOf is not a function
- [Solved] Vuepress Package Error: document is not defined
- [Solved] Syntax Error: TypeError: this.getOptions is not a function
- [Solved] Error: Node Sass does not yet support your current environment
- [Solved] Vue Import swiper.css Error: Module not found…
- [Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtim