因为安装项目依赖一直报错,往上查到说可以下载一个node版本控制工具,我选择了"n",但是输入命令行 npm install -g n一直报以下错误,
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@10.0.0: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS: !win32
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\yxy\AppData\Roaming\npm-cache_logs\2024-10-31T11_28_47_727Z-debug.log
报错图片.png
解决办法:
npm install -g n --force
成功!!!