已解决:Error: EPERM: operation not permitted, mkdir **\node_modules\.***-**'
作者:互联网
Error: EPERM: operation not permitted, mkdir 'E:\nodejs\node_modules\.npm-x5uKn2gY'
在重装了win10系统后npm出现了此问题
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'E:\nodejs\node_modules\.npm-x5uKn2gY'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'E:\nodejs\node_modules\.npm-x5uKn2gY'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'E:\\nodejs\\node_modules\\.npm-x5uKn2gY'
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!
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! F:\Cache\npm_cache\_logs\2022-08-26T08_35_21_674Z-debug-0.log
解决方式 : 在nodejs 的 安装目录右击 选择 属性 > tab栏点击 安全 > 点击中间的编辑按钮 > 弹出的对话框 第一个框里点击自己所用的用户名 > 下边的权限至少选择到修改 > 我选择的是完全控制.
然后就解决了
标签:node,npm,EPERM,ERR,mkdir,modules,operation 来源: https://www.cnblogs.com/008ts/p/16628131.html