**npm ERR!** code EBADPLATFORM
**npm ERR!** notsup Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
**npm ERR!** notsup Valid OS: linux
**npm ERR!** notsup Valid Arch: any
**npm ERR!** notsup Actual OS: darwin
**npm ERR!** notsup Actual Arch: x64
最佳答案
我使用nom遇到了同样的错误,但是我尝试使用Yarn,它起作用了。
$ npm i dev jest
npm WARN deprecated [email protected]: 1.2.0 should have been a major version bump
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"linux","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS: linux
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: darwin
npm ERR! notsup Actual Arch: x64
但是后来我尝试用纱
$ yarn add --dev jest
这可能无法解决npm的问题,但它为我解决了此错误
关于node.js - 如何解决“不受支持的[email protected]平台”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46903250/