ENOENT: no such file or directory, lstat 'C:\Users\33612\AppData\Roaming\npm'
2024-08-05
29
更新完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
解决方法也是很简单,复制Error里的文件路径:C:\Users\33612\AppData\Roaming\,在这个文件夹里创建一个空的npm文件夹就可以了。
我在执行npx create-next-app@latest创建react app就不会报错了。
更新于:1个月前赞一波!
相关文章
- npm ci和npm install的区别
- 如何判断file input的文件来自存储还是相机?
- linux编译报错:/usr/include/c++/7/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
- NPM与Yarn的区别和选择
- Linux编译内核模块时报: linux/scripts/recordmcount: No such file or directory
- Qt编译报错:error: LNK1181: cannot open input file 'debugmain.obj'
- C++编译报错:fatal error: speex/speex_resampler.h: No such file or directory
- linux中Qt编译时报错:qwt_dial.h: No such file or directory
- C++编译报错:fatal error: pcap.h: No such file or directory
- linux中gcc/g++编译时报错 fatal error: codecvt: No such file or directory
- 自己的npm包发布教程
文章评论
全部评论