-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when npm install, get an error #27
Comments
Hello @SamWeichangyue ! |
Same error to me: platform: M1 Macbook Air |
Looks like it was an issue with Puppeteer BrowserFetcher which was solved in newest version. @SamWeichangyue @ocavue |
@mbalabash 2.2.4 still doesn't work
|
@ocavue Thanks for your update. Let's try to locate the issue. const puppeteer = require("puppeteer-core");
(async () => {
const browserFetcher = puppeteer.createBrowserFetcher();
const revisionInfo = await browserFetcher.download("856583");
console.log(`Chromium: r${revisionInfo.revision}`);
console.log(`Chromium downloaded to: ${revisionInfo.folderPath}`);
console.log("Chromium executable path:", revisionInfo.executablePath);
const browser = await puppeteer.launch({
executablePath: revisionInfo.executablePath,
});
const page = await browser.newPage();
await page.goto("https://www.google.com");
await browser.close();
})(); Run two commands: npm install puppeteer-core
node ./index.js and then, post the script output. In this script we are trying to use |
@mbalabash In your example, |
log:
|
If this is some puppeteer issues (e.g. puppeteer doesn’t support M1 Mac yet), at least we can try not to stop M1 users from installing this package. For example, I use M1 Macbook to develop the code and I only use |
The output of script if puppeteer was worked well should be like: Chromium: r856583
Chromium downloaded to: /Users/mbalabash/Projects/estimo-test/node_modules/puppeteer-core/.local-chromium/mac-856583
Chromium executable path: /Users/mbalabash/Projects/estimo-test/node_modules/puppeteer-core/.local-chromium/mac-856583/chrome-mac/Chromium.app/Contents/MacOS/Chromium There are some issues about this problem in Added temporary error/message until puppeteer will fully support M1 Mac. Also, prevented install-script from failure if some error appeared. You can try it in |
After latest puppeteer release, error on Mac M1 has disappeared. |
build was failing since it couldn't install chromium in arm64 mbalabash/estimo#27
platform: M1 Mac Mini
Macos: 11.2.3
browser: google chrome arm64
node version: v15.12.0
npm version: 7.6.3
desc: when npm i , then an error appear , like below:
command sh -c node ./scripts/findChrome.js
npm ERR! Local Chrome version is not suitable
npm ERR! Downloading Chromium r706915...
npm ERR! ERROR: Failed to download Chromium r706915!
npm ERR! TypeError: Cannot read property 'folderPath' of undefined
npm ERR! at downloadChromium (/Users/weichangyue/sunlord/canyon/node_modules/estimo/scripts/chromeDetection.js:220:60)
npm ERR! at async findChrome (/Users/weichangyue/sunlord/canyon/node_modules/estimo/scripts/chromeDetection.js:287:24)
npm ERR! /Users/weichangyue/sunlord/canyon/node_modules/estimo/scripts/chromeDetection.js:288
npm ERR! await writeFile(chromeConfigPath, JSON.stringify({ executablePath: revisionInfo.executablePath }))
npm ERR! ^
npm ERR!
npm ERR! TypeError: Cannot read property 'executablePath' of null
npm ERR! at findChrome (/Users/weichangyue/sunlord/canyon/node_modules/estimo/scripts/chromeDetection.js:288:83)
The text was updated successfully, but these errors were encountered: