我一直遇到npm没有安装包的问题。
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex
npm ERR! dest /mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex' -> '/mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE'
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:
npm ERR! /home/zhelf/.npm/_logs/2020-08-05T16_06_33_155Z-debug.log这是它一直给我的错误,我用WSL和ubuntu 20.04运行windows10,我已经通过常规终端和vscode终端尝试过了。我试着用谷歌搜索这个问题,清除了npm缓存,我得到了同样的问题,我试图安装express,但我也尝试了其他包,但我仍然得到同样的错误。
发布于 2020-08-06 00:44:27
好了,我找到了运行npm install -g build-tools所需的问题,并重新安装了它。
https://stackoverflow.com/questions/63269305
复制相似问题