我正在我的CI/CD管道内部构建商店软件。但是在生成管理前端的时候,我得到了一个npm错误。
当使用npm 8.11或更高版本运行bin/build-administration.sh
时,我会在安装swag-language-pack时得到
=> Installing npm dependencies for swag-language-pack
npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: webpack@5.75.0 from lock file
npm ERR! Missing: @types/eslint-scope@3.7.4 from lock file
npm ERR! Missing: @types/estree@0.0.51 from lock file
npm ERR! Missing: @webassemblyjs/ast@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/wasm-edit@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/wasm-parser@1.11.1 from lock file
npm ERR! Missing: acorn@8.8.1 from lock file
npm ERR! Missing: acorn-import-assertions@1.8.0 from lock file
npm ERR! Missing: browserslist@4.21.4 from lock file
npm ERR! Missing: chrome-trace-event@1.0.3 from lock file
npm ERR! Missing: enhanced-resolve@5.12.0 from lock file
npm ERR! Missing: es-module-lexer@0.9.3 from lock file
npm ERR! Missing: eslint-scope@5.1.1 from lock file
npm ERR! Missing: events@3.3.0 from lock file
npm ERR! Missing: glob-to-regexp@0.4.1 from lock file
npm ERR! Missing: graceful-fs@4.2.10 from lock file
npm ERR! Missing: json-parse-even-better-errors@2.3.1 from lock file
npm ERR! Missing: loader-runner@4.3.0 from lock file
npm ERR! Missing: mime-types@2.1.35 from lock file
npm ERR! Missing: neo-async@2.6.2 from lock file
npm ERR! Invalid: lock file's schema-utils@3.0.0 does not satisfy schema-utils@3.1.1
npm ERR! Missing: tapable@2.2.1 from lock file
npm ERR! Missing: terser-webpack-plugin@5.3.6 from lock file
npm ERR! Missing: watchpack@2.4.0 from lock file
npm ERR! Missing: webpack-sources@3.2.3 from lock file
npm ERR! Missing: @types/eslint@8.4.10 from lock file
npm ERR! Invalid: lock file's @types/json-schema@7.0.6 does not satisfy @types/json-schema@7.0.11
npm ERR! Missing: @webassemblyjs/helper-numbers@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/helper-wasm-bytecode@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/floating-point-hex-parser@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/helper-api-error@1.11.1 from lock file
npm ERR! Missing: @xtuc/long@4.2.2 from lock file
npm ERR! Missing: @webassemblyjs/helper-buffer@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/helper-wasm-section@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/wasm-gen@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/wasm-opt@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/wast-printer@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/ieee754@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/leb128@1.11.1 from lock file
npm ERR! Missing: @webassemblyjs/utf8@1.11.1 from lock file
npm ERR! Missing: @xtuc/ieee754@1.2.0 from lock file
npm ERR! Missing: caniuse-lite@1.0.30001441 from lock file
npm ERR! Missing: electron-to-chromium@1.4.284 from lock file
npm ERR! Missing: node-releases@2.0.8 from lock file
npm ERR! Missing: update-browserslist-db@1.0.10 from lock file
npm ERR! Missing: esrecurse@4.3.0 from lock file
npm ERR! Missing: estraverse@4.3.0 from lock file
npm ERR! Missing: estraverse@5.3.0 from lock file
npm ERR! Missing: mime-db@1.52.0 from lock file
npm ERR! Missing: @jridgewell/trace-mapping@0.3.17 from lock file
npm ERR! Missing: jest-worker@27.5.1 from lock file
npm ERR! Missing: serialize-javascript@6.0.0 from lock file
npm ERR! Missing: terser@5.16.1 from lock file
npm ERR! Missing: @jridgewell/resolve-uri@3.1.0 from lock file
npm ERR! Missing: @jridgewell/sourcemap-codec@1.4.14 from lock file
npm ERR! Missing: @types/node@18.11.18 from lock file
npm ERR! Missing: merge-stream@2.0.0 from lock file
npm ERR! Missing: supports-color@8.1.1 from lock file
npm ERR! Missing: randombytes@2.1.0 from lock file
npm ERR! Missing: safe-buffer@5.2.1 from lock file
npm ERR! Missing: has-flag@4.0.0 from lock file
npm ERR! Missing: @jridgewell/source-map@0.3.2 from lock file
npm ERR! Missing: commander@2.20.3 from lock file
npm ERR! Missing: source-map-support@0.5.21 from lock file
npm ERR! Missing: @jridgewell/gen-mapping@0.3.2 from lock file
npm ERR! Missing: @jridgewell/set-array@1.1.2 from lock file
npm ERR! Missing: buffer-from@1.1.2 from lock file
npm ERR! Missing: source-map@0.6.1 from lock file
npm ERR! Missing: escalade@3.1.1 from lock file
npm ERR! Missing: picocolors@1.0.0 from lock file
npm ERR!
我还尝试了最新版本的npm或使用npm config set legacy-peer-deps true
,如在此线程中所提到的:Cannot build Shopware 6 admin with npm 8.11
但是它不起作用,我目前唯一可以使用的解决方法是回到npm8.5.5
1条答案
按热度按时间wlp8pajw1#
请清理您的环境,然后重试。
如果这样做没有帮助,也可以发布您的package.json和节点版本。
在package-lock.json重建之后,您可以使用npm ci。