npm install -g yarn
npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D:\eclipse-workspace\tools\nodejs\node_global\node_modules\.staging
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir 'D:\eclipse-workspace\tools\nodejs\node_global\node_modules\.staging'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'D:\eclipse-workspace\tools\nodejs\node_global\node_modules\.staging'] {
npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'D:\eclipse-workspace\tools\nodejs\node_global\node_modules\.staging'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'D:\\eclipse-workspace\\tools\\nodejs\\node_global\\node_modules\\.staging'
npm ERR! },
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'D:\\eclipse-workspace\\tools\\nodejs\\node_global\\node_modules\\.staging'
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! C:\Users\29395\AppData\Roaming\npm-cache\_logs\2022-02-20T11_38_00_564Z-debug.log
如果你出现这个错误,你直接用管理员打开终端,重新输入命令就行。
人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站
[https://www.captainai.net/shuai](https://www.captainai.net/shuai)