简体   繁体   English

Shopware 6:Storefront 编译中缺少 node_modules

[英]Shopware 6: Missing node_modules in Storefront Compilation

When I try to compile shopware 6 with当我尝试编译 shopware 6 时

./bin/build-storefront.sh

i get an error message, that the Chromium Download could not be done.我收到一条错误消息,无法完成 Chromium 下载。

npm ERR! code 1
npm ERR! path /home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! ERROR: Failed to set up Chromium r950341! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! [Error: EINVAL: invalid argument, realpath '/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer/.local-chromium/linux-950341'] {
npm ERR!   errno: -22,
npm ERR!   code: 'EINVAL',
npm ERR!   syscall: 'realpath',
npm ERR!   path: '/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer/.local-chromium/linux-950341'
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2022-09-14T08_03_06_847Z-debug.log

(I replaced the real username and shopname folders with username here.) (我在这里用 username 替换了真实的 username 和 shopname 文件夹。)

I checked the folder /home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/ , but it is empty.我检查了文件夹/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/ ,但它是空的。

Should I run npm install in the shoproot?我应该在 shoproot 中运行 npm install 吗?

Is it save, to run npm install in an advanced developed system, or will it break things?在高级开发系统中运行 npm install 是否可以保存,或者它会破坏东西吗?

Sure I'll make a backup first, but I am not sure, if I can run it anyway.当然,我会先进行备份,但我不确定是否可以运行它。 The shop is a staging system of a complete running shopware system with a couple of extensions and custom themes.该商店是一个完整的运行 shopware 系统的阶段系统,具有几个扩展和自定义主题。

There's an environment variable you can set to skip the download.您可以设置一个环境变量来跳过下载。 Execute this before running the storefront build script.在运行店面构建脚本之前执行此操作。

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1

I added also我也加了

export PUPPETEER_EXECUTABLE_PATH=`which chromium`

in case you already have chrome/chromium installed.如果您已经安装了 chrome/chromium。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM