项目场景:

提示:这里简述项目相关背景:
win+R cmd 执行npm install pnpm -g 报errno -4048


问题描述 执行报如下错误

`


```bash
PS E:\project> npm install -g pnpm
npm error code EPERM
npm error syscall mkdir
npm error path D:\Nodejs\node_global\node_modules\.pnpm-JQiV5EIu
npm error errno -4048
npm error Error: EPERM: operation not permitted, mkdir 'D:\Nodejs\node_global\node_modules\.pnpm-JQiV5EIu'
...
npm error The operation was rejected by your operating system.
npm error It's possible that the file was already in use (by a text editor or antivirus),
npm error or that you lack permissions to access it.

解决方案:

提示:这里填写该问题的具体解决方案:

1、删除.npmrc文件
C盘的目录下生成一.npmrc文件文件,该文件在:C:\Users{账户}\下的.npmrc文件。一般这种类型的文件都是默认被隐藏,查看隐藏文件

参考链接:

https://blog.csdn.net/qq_36105011/article/details/139763403

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐