WSL-运行npm安装时出现问题



我试图在一个项目上运行npm安装,但我一直收到这个错误

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/mvargas/work-repos/red-keep/node_modules/@pm2/io/node_modules/semver/bin/semver
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/mvargas/work-repos/red-keep/node_modules/@pm2/io/node_modules/semver/bin/semver'
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/mvargas/.npm/_logs/2021-04-15T01_14_50_914Z-debug.log

我在Ubuntu 20.04lts中使用WSL2,节点版本为15.14.0,npm版本为7.7.6

解决方案:降级到节点10

最新更新