嗨,我正在运行npm,得到下面的错误,.I是新到节点js的,请帮助。我作为管理员运行这个命令,并且windows安全也是off.Operating系统是win 11
error errno -4048
40 error [Error: EPERM: operation not permitted, mkdir 'D:\'] {
40 error errno: -4048,
40 error code: 'EPERM',
40 error syscall: 'mkdir',
40 error path: 'D:\\'
40 error }
41 error
41 error The operation was rejected by your operating system.
41 error It's possible that the file was already in use (by a text
editor or antivirus),
41 error or that you lack permissions to access it.
41 error
41 error If you believe this might be a permissions issue, please
double-check the
41 error permissions of the file and its containing directories, or
try running
41 error the command again as root/Administrator.
发布于 2021-12-25 14:58:48
我在项目文件夹中创建了一个名为node_modules的目录,现在它正在工作。
发布于 2021-12-25 13:56:56
您可能没有写入文件夹D:\
的权限,正如错误消息中所述。请确认您的用户可以在该目录中创建一个文件夹。
另一个测试是将项目移动到用户的文件夹,然后从那里发出一个npm install
。
https://stackoverflow.com/questions/70480446
复制相似问题