NPM 警告:“引擎不受支持”

Shr*_*wal 17 node.js npm vite

npm install -D tailwind css postcss autoprefixer vite我在 VS-Code 中输入了命令。

我的环境是:

  • NPM版本:8.1.2
  • Node.js 版本:16.13.1

这导致了以下警告:

npm WARN idealTree Removing dependencies.vite in favor of devDependencies.vite
npm WARN EBADENGINE Unsupported engine {    
npm WARN EBADENGINE   package: 'amqplib@0.5.2',    
npm WARN EBADENGINE   required: { node: '>=0.8 <=9' },
npm WARN EBADENGINE   current: { node: 'v16.13.1', npm: '8.1.2' }
npm WARN EBADENGINE }
Run Code Online (Sandbox Code Playgroud)

我的 package.json 是:

npm WARN idealTree Removing dependencies.vite in favor of devDependencies.vite
npm WARN EBADENGINE Unsupported engine {    
npm WARN EBADENGINE   package: 'amqplib@0.5.2',    
npm WARN EBADENGINE   required: { node: '>=0.8 <=9' },
npm WARN EBADENGINE   current: { node: 'v16.13.1', npm: '8.1.2' }
npm WARN EBADENGINE }
Run Code Online (Sandbox Code Playgroud)

小智 20

这不是一个重大错误,只是意味着某些功能可能无法按预期工作。如这一npm WARN EBADENGINE required: { node: '>=0.8 <=9' }行所示,此包按预期工作所需的节点版本在 0.8 到 9 之间,但您拥有节点 16。


小智 14

我在尝试安装时也发生过这种情况,tailwindcss并且安装tailwind错误。如果您也是这种情况,只需将其卸载即可。