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.
Related
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)
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??
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).
After using horizon dev server for some time I suddenly get a '400 Bad Request Error'. After restarting the server I get the following error in the terminal:
at ReqlRuntimeError.ReqlError [as constructor] (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\errors.js:23:13)
at new ReqlRuntimeError (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\errors.js:90:51)
at mkErr (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\util.js:177:10)
at Feed.IterableResult._addResponse (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\cursor.js:75:27)
at TcpConnection.<anonymous> (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\net.js:360:22)
at TcpConnection.cancel (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\util.js:26:16)
at TcpConnection.cancel (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\net.js:783:43)
at wrappedCb (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\net.js:270:17)
at tryCatcher (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\util.js:26:23)
at Promise.successAdapter (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\nodeify.js:23:30)
at Promise._settlePromiseAt (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\promise.js:579:21)
at Promise._settlePromises (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\promise.js:697:14)
at Async._drainQueue (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\async.js:123:16)
at Async._drainQueues (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (c:\Users\carl\AppData\Roaming\npm\node_modules\horizon\node_modules\rethinkdb\node_modules\bluebird\js\main\async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
The error gets logged two to three times in a row and then it states:
Horizon ready for connections �
But when reconnecting to the server via 'localhost:8181' it states '400 Bad Request Error' in the console again.
The Admin Interface is showing no issues.
This happens while playing around with the code from the Getting Started Guide on a Win10 64bit machine using Node.js v4.4.4 and horizon v1.0.1.
Since I updated to horizon v1.0.2 I haven't had the problem anymore. Neither the ReqlRuntimeError nor the 400 Bad Request Error.
This bug has been crashing my node.js server for the past one week. On average it seems to occur every 12 hours. Normally when an error occurs in node.js, node.js will tell you the line number and your source file that lead to the error. However, this error is so weird that it does not let me know where the error originates from in my source codes. I can't even find _http_server.js within the entire project and node modules. As such, I have been unable to pinpoint and eliminate the bug.
Without the stack trace module 'longjohn', I would get the following error message:
socket.parser.resume()
cannot read property resume of null (_http_server.js:442)
......
After I installed 'longjohn', I obtained the following error message:
TypeError: Cannot read property 'resume' of null
at socketOnDrain (_http_server.js:442:20)
at ServerResponse.updateOutgoingData [as _onPendingData] (_http_server.js:270:14)
at ServerResponse.OutgoingMessage._send (_http_outgoing.js:128:14)
at ServerResponse.OutgoingMessage.write (_http_outgoing.js:470:16)
at ReadStream.ondata (_stream_readable.js:525:20)
at emitOne (events.js:77:13)
at ReadStream.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at ReadStream.Readable.push (_stream_readable.js:110:10)
at onread (fs.js:1744:12)
at FSReqWrap.wrapper [as oncomplete] (fs.js:576:17)
---------------------------------------------
at ReadStream.Readable.on (_stream_readable.js:655:33)
at ReadStream.Readable.pipe (_stream_readable.js:522:7)
at SendStream.stream (C:\XXXX\node_modules\express\node_modules\send\lib\send.js:533:10)
at SendStream.send (C:\XXXX\node_modules\express\node_modules\send\lib\send.js:480:8)
at C:\XXXX\node_modules\express\node_modules\send\lib\send.js:392:10
at FSReqWrap.oncomplete (fs.js:82:15)
worker 1760 died
It is worthwhile mentioning that I am using socket.io. I am also using an external service called Global Counter that displays the number of online users. I am running setInterval() in one of the workers to remove expired records.
Could someone tell me the meaning of these error messages, how the error occurs, and how I should solve it?
according to https://github.com/nodejs/node/issues/3508, you may fix this problem after upgrading nodejs to v4.2.3+ or v5.1.1+