nodejs版本 安装n模块报错 npm ERR! code EBADPLATFORM

参考https://blog.csdn.net/cnoneo/article/details/100667098

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: win32
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\LX\AppData\Roaming\npm-cache_logs\2021-04-21T09_34_26_950Z-debug.log

遇到这样错误信息,先将生成的node_modules文件夹删除,再在命令后面加上 --force重新运行;
如:npm install --force即可;
如果不行,再反复执行上面的步骤。

你可能感兴趣的:(nodejs版本 安装n模块报错 npm ERR! code EBADPLATFORM)