magesuite / magepack

Next generation Magento 2 advanced JavaScript bundler.
Open Software License 3.0
435 stars 91 forks source link

Could not find Chrome (ver. 115.0.5790.98) #179

Open dandrikop opened 1 year ago

dandrikop commented 1 year ago

I installed the required software as shown below but it seems that something is missing:

npm -g list

/opt/cpanel/ea-nodejs16/lib ├── chrome@0.1.0 ├── chromium@3.0.3 ├── corepack@0.17.0 ├── magepack@2.11.2 ├── npm@8.19.4 └── puppeteer@20.9.0

When I run the command: magepack generate --cms-url="{{http://...}}" --category-url="{{https://....html}}" --product-url="{{https://....html}}"

I get the below: ` ERROR Could not find Chrome (ver. 115.0.5790.98). This can occur if either 14:27:39

  1. you did not perform an installation before running the script (e.g. npm install) or
  2. your cache path is incorrectly configured (which is: /home/.cache/puppeteer). For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.

    1. you did not perform an installation before running the script (e.g. npm install) or
    2. your cache path is incorrectly configured (which is: /home/.cache/puppeteer). For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration. at ChromeLauncher.resolveExecutablePath (/opt/cpanel/ea-nodejs16/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:300:27) at ChromeLauncher.executablePath (/opt/cpanel/ea-nodejs16/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:180:25) at ChromeLauncher.computeLaunchArguments (/opt/cpanel/ea-nodejs16/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:97:37) at async ChromeLauncher.launch (/opt/cpanel/ea-nodejs16/lib/node_modules/puppeteer/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:79:28) at async module.exports (/opt/cpanel/ea-nodejs16/lib/node_modules/magepack/lib/generate.js:11:21)`
Summaw commented 1 year ago

I might be wrong but if you have the correct chrome in a diff place on your pc why not just set the executable path? Example:

executablePath: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"