[英]Shopware 6: Missing node_modules in Storefront Compilation
當我嘗試編譯 shopware 6 時
./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
(我在這里用 username 替換了真實的 username 和 shopname 文件夾。)
我檢查了文件夾/home/username/vendor/shopware/storefront/Resources/app/storefront/node_modules/
,但它是空的。
我應該在 shoproot 中運行 npm install 嗎?
在高級開發系統中運行 npm install 是否可以保存,或者它會破壞東西嗎?
當然,我會先進行備份,但我不確定是否可以運行它。 該商店是一個完整的運行 shopware 系統的階段系統,具有幾個擴展和自定義主題。
您可以設置一個環境變量來跳過下載。 在運行店面構建腳本之前執行此操作。
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
我也加了
export PUPPETEER_EXECUTABLE_PATH=`which chromium`
如果您已經安裝了 chrome/chromium。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.