windows安装npm n模块的时候报错,很恼火

C:\Users\45113>npm install -g n
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for n@9.2.0: wanted {"os":"!win32"} (current: {"os":"win32","arch":"x64"})
npm ERR! notsup Valid OS:    !win32
npm ERR! notsup Valid Arch:  undefined
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\45113\AppData\Local\npm-cache\_logs\2023-12-15T07_55_34_325Z-debug-0.log

强制安装就好了,–force强制安装

npm install -g n --force

在这里插入图片描述

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐