Pupeeteer heroku buildpack exiting the lunch statement on heroku

217 Views Asked by At

This is the error it gives me when I deploy to heroku

It is says that I should check the file "localScrape.js" on line 11 column 21. I went and included a try/catch block to work my way around it but it is persistently giving me the same error could.

2020-10-02T14:06:40.613205+00:00 app[web.1]: > node index
2020-10-02T14:06:40.613205+00:00 app[web.1]: 
2020-10-02T14:06:41.196275+00:00 app[web.1]: Innitializing.....
2020-10-02T14:06:41.197532+00:00 app[web.1]: Starting the server....
2020-10-02T14:06:41.197609+00:00 app[web.1]: Server started..
2020-10-02T14:06:41.197667+00:00 app[web.1]: Server Listening on port 4000
2020-10-02T14:06:41.950485+00:00 app[web.1]: DB Connected successfully
2020-10-02T14:06:47.624092+00:00 app[web.1]: events.js:292
2020-10-02T14:06:47.624104+00:00 app[web.1]:       throw er; // Unhandled 'error' event
2020-10-02T14:06:47.624105+00:00 app[web.1]:       ^
2020-10-02T14:06:47.624105+00:00 app[web.1]: 
2020-10-02T14:06:47.624106+00:00 app[web.1]: Error: read ENOTCONN
2020-10-02T14:06:47.624106+00:00 app[web.1]:     at tryReadStart (net.js:573:20)
2020-10-02T14:06:47.624107+00:00 app[web.1]:     at Socket._read (net.js:584:5)
2020-10-02T14:06:47.624107+00:00 app[web.1]:     at Socket.Readable.read (_stream_readable.js:467:10)
2020-10-02T14:06:47.624108+00:00 app[web.1]:     at Socket.read (net.js:624:39)
2020-10-02T14:06:47.624108+00:00 app[web.1]:     at new Socket (net.js:376:12)
2020-10-02T14:06:47.624109+00:00 app[web.1]:     at Object.Socket (net.js:267:41)
2020-10-02T14:06:47.624109+00:00 app[web.1]:     at createSocket (internal/child_process.js:314:14)
2020-10-02T14:06:47.624109+00:00 app[web.1]:     at ChildProcess.spawn (internal/child_process.js:437:23)
2020-10-02T14:06:47.624110+00:00 app[web.1]:     at Object.spawn (child_process.js:548:9)
2020-10-02T14:06:47.624110+00:00 app[web.1]:     at BrowserRunner.start (/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:51:34)
2020-10-02T14:06:47.624111+00:00 app[web.1]:     at ChromeLauncher.launch (/app/node_modules/puppeteer/lib/Launcher.js:64:16)
2020-10-02T14:06:47.624111+00:00 app[web.1]:     at async localScrape (/app/Scraper/localScrape.js:11:21)
2020-10-02T14:06:47.624111+00:00 app[web.1]:     at async doScraping (/app/index.js:20:3)
2020-10-02T14:06:47.624112+00:00 app[web.1]: Emitted 'error' event on Socket instance at:
2020-10-02T14:06:47.624112+00:00 app[web.1]:     at emitErrorNT (internal/streams/destroy.js:92:8)
2020-10-02T14:06:47.624112+00:00 app[web.1]:     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2020-10-02T14:06:47.624113+00:00 app[web.1]:     at processTicksAndRejections (internal/process/task_queues.js:84:21) {
2020-10-02T14:06:47.624113+00:00 app[web.1]:   errno: 'ENOTCONN',
2020-10-02T14:06:47.624114+00:00 app[web.1]:   code: 'ENOTCONN',
2020-10-02T14:06:47.624114+00:00 app[web.1]:   syscall: 'read'
2020-10-02T14:06:47.624114+00:00 app[web.1]: }
2020-10-02T14:06:47.643941+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-10-02T14:06:47.644301+00:00 app[web.1]: npm ERR! errno 1
2020-10-02T14:06:47.648553+00:00 app[web.1]: npm ERR! [email protected] start: `node index`
2020-10-02T14:06:47.648770+00:00 app[web.1]: npm ERR! Exit status 1
2020-10-02T14:06:47.649014+00:00 app[web.1]: npm ERR! 
2020-10-02T14:06:47.649222+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2020-10-02T14:06:47.649428+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-10-02T14:06:49.194170+00:00 app[web.1]: 
2020-10-02T14:06:49.194363+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-10-02T14:06:49.194480+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-10-02T14_06_47_651Z-debug.log
2020-10-02T14:06:49.249822+00:00 heroku[web.1]: Process exited with status 1
2020-10-02T14:06:49.281443+00:00 heroku[web.1]: State changed from starting to crashed```
0

There are 0 best solutions below