NodeJS bin/build-storefront.shon Apple Silicon

7kjnsjlb  于 2023-04-11  发布在  Node.js
关注(0)|答案(1)|浏览(124)

在我的Apple Silicon上尝试运行命令“bin/build-storefront.sh”时,遇到了一条错误消息。错误消息表明“puppeteer”模块有问题,并且chromium二进制文件不适用于arm 64架构。错误建议使用特定命令安装chromium,但似乎对Apple Silicon不起作用。是否有任何已知的变通方法或解决方案可以在Apple Silicon上成功运行此命令?
错误消息如下:

npm ERR! code 1
npm ERR! path /var/www/html/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer
npm ERR! command failed
npm ERR! command sh -c -- node install.js
npm ERR! The chromium binary is not available for arm64.
npm ERR! If you are on Ubuntu, you can install with: 
npm ERR! 
npm ERR!  sudo apt install chromium
npm ERR! 
npm ERR! 
npm ERR!  sudo apt install chromium-browser
npm ERR! 
npm ERR! /var/www/html/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115
npm ERR!                     throw new Error();
npm ERR!                     ^
npm ERR! 
npm ERR! Error
npm ERR!     at /var/www/html/vendor/shopware/storefront/Resources/app/storefront/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:115:27
npm ERR!     at FSReqCallback.oncomplete (node:fs:202:21)

npm ERR! A complete log of this run can be found in:
krcsximq

krcsximq1#

如果你想用Cypress运行e2e测试,这只是一个要求。只需通过运行这样的脚本跳过下载:

PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 bin/build-storefront.sh

相关问题