I am trying to run a small script in AWS lambda using AWSCloud9 but always get an error...!
2020-04-06 20:21:45.163 Error: Failed to launch the browser process!
/var/task/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: error while
loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/var/task/node_modules/puppeteer/lib/Launcher.js:750:14)
at Interface.<anonymous> (/var/task/node_modules/puppeteer/lib/Launcher.js:739:50)
at Interface.emit (events.js:323:22)
at Interface.close (readline.js:409:8)
at Socket.onend (readline.js:187:10)
at Socket.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Any Help??
Related
I am running through smart contract creation and deployment from scratch to reaffirm knowledge in the fundamentals of contract creation.
After successfully creating local accounts via $truffle develop and jumping into the development console via truffle console --network development (development can be replaced by whichever network name you have defined in truffle.js), running deploy --compile-all --reset returns the following error;
TypeError: Contracts.compile is not a function
at Object.run (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:202236:15)
at Command.run (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:160767:20)
at Console.interpret (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:202606:25)
at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:203345:18)
at bound (node:domain:421:15)
at REPLServer.runBound [as eval] (node:domain:432:12)
at REPLServer.onLine (node:repl:893:10)
at REPLServer.emit (node:events:526:28)
at REPLServer.emit (node:domain:475:12)
at REPLServer.Interface._onLine (node:readline:487:10)
Any help would be much appreciated.
I am trying to deploy app website in digital ocean and I have this error:
reject(new Error([
^
Error: Failed to launch the browser process!
********/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (********/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (********/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (node:events:402:35)
at Interface.close (node:readline:586:8)
at Socket.onend (node:readline:277:10)
at Socket.emit (node:events:402:35)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
error in console
shubhabrata#shubhabrata-VirtualBox:~/Meteor/myapp$ mupx deploy
Meteor Up: Production Quality Meteor Deployments
Configuration file : mup.json
Settings file : settings.json
“ Checkout Kadira!
It's the best way to monitor performance of your app.
Visit: https://kadira.io/mup ”
Meteor app path : /home/shubhabrata/Meteor/myapp
Using buildOptions : {}
buffer.js:80
throw new Error(
^
Error: If encoding is specified then the first argument must be a string
at new Buffer (buffer.js:80:13)
at Readable. (/usr/lib/node_modules/mupx/node_modules/archiver/lib/util/index.js:32:15)
at emitNone (events.js:91:20)
at Readable.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
Switching from node 7 to node 5.12 worked for me. I installed using nvm so that I can use later node versions in the future.
This occurred for me while using (deliberately) an old version of mup. It could well be that just upgrading mup will fix the problem.
A very frustrating thing about JavaScript is that if it fails on an external module, it doesn't tell you the line of your code that initiated the path.
For example:
Unhandled rejection RequestError: Error: socket hang up
at new RequestError (/../node_modules/request-promise/lib/errors.js:11:15)
at Request.RP$callback [as _callback] (/../node_modules/request-promise/lib/rp.js:60:32)
at self.callback (/../node_modules/request/request.js:199:22)
at Request.emit (events.js:95:17)
at Request.onRequestError (/../node_modules/request/request.js:821:8)
at ClientRequest.emit (events.js:95:17)
at Socket.socketOnEnd (http.js:1569:9)
at Socket.g (events.js:180:16)
at Socket.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickDomainCallback (node.js:492:13)
In what reality is this stack trace useful? Is there any way to get it to print the last "non node_module" call that resulted in the exception?
There are several node modules providing an "async stacktrace". They seem to provide a similar functionality to the Async checkbox in the Chrome developer tools (under "Sources"). I have never actually worked with any of them, and I don't think they're necessarily meant for production systems, but they may well be useful for a development environment.
A quick google search shows you a number of possible modules (e.g. async-stacktrace).
When I run node app.js, I get the following error:
Failed to load c++ bson extension, using pure JS version
Express server listening on port 3000
events.js:85
throw er; // Unhandled 'error' event
^
Error: failed to connect to [localhost:27017]
at null.<anonymous> (/Users/me/development/node_modules/mongodb/lib/mongodb/connection/server.js:553:74)
at emit (events.js:118:17)
at null.<anonymous> (/Users/me/development/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
at emit (events.js:110:17)
at Socket.<anonymous> (/Users/me/developmen/node_modules/mongodb/lib/mongodb/connection/connection.js:512:10)
at Socket.emit (events.js:107:17)
at net.js:451:14
at process._tickCallback (node.js:355:11)
I'm not sure whether this is localhost problem or an issue with the connection to mongodb. I tried looking at similar questions SO and Github but it didn't help me.
Seems like mongodb server is not running. Check it