在Node 16上安装Angular会收到警告



我正在Node 16.15.0或最新的LTS上安装Angular,我得到以下警告,我应该继续我的项目还是更改节点版本?

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular/cli@13.3.5',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.20.0 || ^14.15.0 || >=16.10.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v16.15.0', npm: '7.5.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/architect@0.1303.5',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.20.0 || ^14.15.0 || >=16.10.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v16.15.0', npm: '7.5.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/core@13.3.5',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.20.0 || ^14.15.0 || >=16.10.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v16.15.0', npm: '7.5.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/schematics@13.3.5',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.20.0 || ^14.15.0 || >=16.10.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v16.15.0', npm: '7.5.3' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@schematics/angular@13.3.5',
npm WARN EBADENGINE   required: {
npm WARN EBADENGINE     node: '^12.20.0 || ^14.15.0 || >=16.10.0',
npm WARN EBADENGINE     npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
npm WARN EBADENGINE     yarn: '>= 1.13.0'
npm WARN EBADENGINE   },
npm WARN EBADENGINE   current: { node: 'v16.15.0', npm: '7.5.3' }
npm WARN EBADENGINE }

我相信这是你的npm版本的问题,而不是节点的问题。它期待npm版本>7.5.6,而你的NPM版本是7.5.3

required: {
...
npm: '^6.11.0 || ^7.5.6 || >=8.0.0',
},
current: { node: 'v16.15.0', npm: '7.5.3' }

最新更新