Hi please can anyone solve this because i was getting this error in heroku so i decided to migrate into render.com but still the same error in render as well so kindly please suggest anyway of solving this.
Mar 1 05:32:05 PM ==> Starting service with ‘node index.js’
Mar 1 05:32:16 PM Example app listening on port 3000!
Mar 1 05:32:36 PM { Ans_value: ‘find lcm’ }
Mar 1 05:32:36 PM /opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:127
Mar 1 05:32:36 PM throw new Error(Could not find Chromium (rev. ${this.puppeteer.browserRevision}). This can occur if either\n +
Mar 1 05:32:36 PM ^
Mar 1 05:32:36 PM
Mar 1 05:32:36 PM Error: Could not find Chromium (rev. 1095492). This can occur if either
Mar 1 05:32:36 PM 1. you did not perform an installation before running the script (e.g. npm install) or
Mar 1 05:32:36 PM 2. your cache path is incorrectly configured (which is: /opt/render/.cache/puppeteer).
Mar 1 05:32:36 PM For (2), check out our guide on configuring puppeteer at Configuration | Puppeteer.
Mar 1 05:32:36 PM at ChromeLauncher.resolveExecutablePath (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:127:27)
Mar 1 05:32:36 PM at ChromeLauncher.executablePath (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:206:25)
Mar 1 05:32:36 PM at PuppeteerNode.executablePath (/opt/render/project/src/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js:162:105)
Mar 1 05:32:36 PM at Object.scraptheweb (/opt/render/project/src/scrapers.js:24:23)
Mar 1 05:32:36 PM at /opt/render/project/src/index.js:25:37
Mar 1 05:32:36 PM at Layer.handle [as handle_request] (/opt/render/project/src/node_modules/express/lib/router/layer.js:95:5)
Mar 1 05:32:36 PM at next (/opt/render/project/src/node_modules/express/lib/router/route.js:144:13)
Mar 1 05:32:36 PM at Route.dispatch (/opt/render/project/src/node_modules/express/lib/router/route.js:114:3)
Mar 1 05:32:36 PM at Layer.handle [as handle_request] (/opt/render/project/src/node_modules/express/lib/router/layer.js:95:5)
Mar 1 05:32:36 PM at /opt/render/project/src/node_modules/express/lib/router/index.js:284:15
Mar 1 05:32:36 PM
Mar 1 05:32:36 PM Node.js v19.7.0
Mar 1 05:32:52 PM ==> Detected Node version 19.7.0
Mar 1 05:32:52 PM ==> Starting service with ‘node index.js’
Mar 1 05:33:01 PM Example app listening on port 3000!
Thanks a lot for your reply this is issue is being solved. i am getting the reponse as well as the required output but in the render logs as seen in the attached pic. but once i look into the url i am getting the error can not get / this is the url for my webservice also my static service and the webservice are communicating together. but i am getting the can not get / error.
I solved this by adding a puppeteer.config.cjs file to my project which set the cache directory (as suggested at https://pptr.dev/) … I then had to manual deploy->clear build cache and deploy so that it would rebuild the dependencies.
If anyone is having issues with this method, try naming the file .puppeteerrc.cjs. This filename worked for me whereas puppeteer.config.cjs didn’t. The content of the file is the same though