Node.js npm未在WSL上安装程序包
我一直遇到npm没有安装软件包的问题Node.js npm未在WSL上安装程序包,node.js,npm,windows-subsystem-for-linux,Node.js,Npm,Windows Subsystem For Linux,我一直遇到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
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
这是它一直给我的错误,我正在运行Windows10和WSL以及ubuntu 20.04,我已经通过常规终端和vscode中的终端进行了尝试。我曾尝试用谷歌搜索该问题并清除了npm缓存,我遇到了与我尝试安装express时相同的问题,但也尝试了其他软件包,并且不断出现相同的错误。好的,我发现了运行
npm安装-g构建工具所需的问题,并再次安装了该软件包