返回

ENOENT: no such file or directory, lstat 'C:\Users\33612\AppData\Roaming\npm'

2023-11-05 ENOENT no such file or directory npm 810 0

更新完Node.js后,执行npm命令报错了:

npm ERR! code ENOENT

npm ERR! syscall lstat

npm ERR! path C:\Users\33612\AppData\Roaming\npm

npm ERR! errno -4058

npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\33612\AppData\Roaming\npm'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

npm ERR! A complete log of this run can be found in: C:\Users\33612\AppData\Local\npm-cache\_logs\2023-11-04T22_16_32_378Z-debug-0.log

ENOENT: no such file or directory, lstat 'C:\Users\33612\AppData\Roaming\npm'

解决方法也是很简单,复制Error里的文件路径:C:\Users\33612\AppData\Roaming\,在这个文件夹里创建一个空的npm文件夹就可以了。

我在执行npx create-next-app@latest创建react app就不会报错了。

您可能感兴趣:

阿里云 云服务器 99元1年 2核2G 3M固定带宽 续费与新购同价

DOVE 网络加速器免费试用

顶部