【问题标题】:Shopware 6: Missing node_modules in Storefront CompilationShopware 6:店面编译中缺少 node_modules
【发布时间】:2022-10-02 04:58:17
【问题描述】:

当我尝试用

./bin/build-storefront.sh

我收到一条错误消息,提示无法完成 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

(我在这里用用户名替换了真实的用户名和商店名称文件夹。)

我检查了文件夹/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/,但它是空的。

我应该在 shoproot 中运行 npm install 吗?

在高级开发系统中运行 npm install 是省钱,还是会破坏?

当然我会先备份,但我不确定是否可以运行它。该商店是一个完整的运行商店软件系统的暂存系统,具有几个扩展和自定义主题。

    标签: npm puppeteer chromium shopware shopware6


    【解决方案1】:

    您可以设置一个环境变量来跳过下载。在运行店面构建脚本之前执行此操作。

    export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
    

    【讨论】:

      【解决方案2】:

      我也加了

      export PUPPETEER_EXECUTABLE_PATH=`which chromium`
      

      如果您已经安装了 chrome/chromium。

      【讨论】:

        猜你喜欢
        • 2021-06-08
        • 1970-01-01
        • 2022-11-12
        • 2022-07-19
        • 2023-01-20
        • 2023-01-22
        • 1970-01-01
        • 2020-10-15
        • 2010-10-02
        相关资源
        最近更新 更多