Error: Failed to launch the browser process! spawn /app/node_modules/puppeteer/.local-chromium/linux-756035/chrome-linux/chrome ENOENT
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: ^3.3.0
- Platform / OS version: Ubuntu 20.04 LTS
- URLs (if applicable):
- Node.js version: 12.16.1
What steps will reproduce the problem?
I know there’s a lot of issues like this one, but I tried every solutions I saw, such as add args to the .launch, reinstall all required dependencies, reinstall puppeteer, reinstall Chromium, try Chrome… But I still get this error.
- In backend : `const puppeteer = require(‘puppeteer’); const router = require(‘express’).Router();
router.get(‘/create’, async (req, res) => { console.log(“BEGINING PDF CREATION PROCESS”); try { // Starting browser and got to a new page const browser = await puppeteer.launch({ headless: true }); const page = await browser.newPage(); await page.goto(‘https://google.com’); // Define the media type await page.emulateMediaType(‘screen’); // Create PDF with custom options const buffer = await page.pdf({ format: ‘A4’, printBackground: true, preferCSSPageSize: true }); // Send PDF to front res.writeHead(200, { ‘Content-Type’: ‘application/pdf’, ‘Content-Length’: buffer.length }); res.end(buffer); // Close browser await browser.close() console.log(“ENDING PROCESS SUCCESSFULY”); } catch (error) { console.log(“ENDING PROCESS UNSUCCESSFULY”); console.log(error); } });
module.exports = router2. frontend :axios({
method: ‘get’,
url:‘/pdf/create’
})
.then(res => {
console.log(“Response received”)
return res
.arrayBuffer()
.then(res => {
const blob = new Blob([res], { type: ‘application/pdf’ })
saveAs(blob, ${order._id}.pdf)
})
.catch(error => console.log(error))
})`
3.
What is the expected result? It should send the PDF buffer to the front.
What happens instead? I returns the error above.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:12

Top Related StackOverflow Question
@qiaochunmei 这解决了问题. 祝好运.
The error I was getting was:
spawn D:\Users\johns10\Documents\GitHub\userdocs_umbrella\apps\userdocs_web\assets\dist\win-unpacked\resources\app.asar\node_modules\puppeteer\.local-chromium\win64-856583\chrome-win\chrome.exe ENOENTI solved it like this: