无法使用 npm 8.11 构建 Shopware 6 admin

Ale*_*lex 0 npm eslint shopware6

运行时bin/build-administration.sh我们得到

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: eslint-config-airbnb-base@13.2.0
npm ERR! Found: eslint@7.10.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"7.10.0" from the root project
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/eslint-plugin@5.1.0
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     @typescript-eslint/eslint-plugin@"5.1.0" from the root project
npm ERR!   14 more (@typescript-eslint/experimental-utils, eslint-utils, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from eslint-config-airbnb-base@13.2.0
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR!   dev eslint-config-airbnb-base@"13.2.0" from the root project
npm ERR!   eslint-config-airbnb-base@"^13.2.0" from @shopware-ag/eslint-config-base@1.0.0
npm ERR!   node_modules/@shopware-ag/eslint-config-base
npm ERR!     @shopware-ag/eslint-config-base@"1.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@5.16.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^4.19.1 || ^5.3.0" from eslint-config-airbnb-base@13.2.0
npm ERR!   node_modules/eslint-config-airbnb-base
npm ERR!     dev eslint-config-airbnb-base@"13.2.0" from the root project
npm ERR!     eslint-config-airbnb-base@"^13.2.0" from @shopware-ag/eslint-config-base@1.0.0
npm ERR!     node_modules/@shopware-ag/eslint-config-base
npm ERR!       @shopware-ag/eslint-config-base@"1.0.0" from the root project
Run Code Online (Sandbox Code Playgroud)

我们正在使用这个版本:

$ npm -v
8.11.0
$ node -v
v16.15.1
Run Code Online (Sandbox Code Playgroud)

和商店软件 6.4.11.1

在 npm 8.5 中,它似乎可以工作。

我想知道这是 Shopware 还是 npm 中的错误?

我猜想 Shopware 中需要更新一些东西吗?

小智 5

npm config set legacy-peer-deps=true在您的项目文件夹中运行

这与https://github.com/npm/cli/issues/4664有关