You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// web3test.js
var Web3 = require('web3')
var web3 = new Web3('HTTP://127.0.0.1:7545')
web3.eth.getAccounts().then(accounts => console.log(accounts));
but I've got the following error.
$ node web3test.js
internal/modules/cjs/loader.js:605
throw err;
^
Error: Cannot find module '@babel/runtime/helpers/classCallCheck'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
at Function.Module._load (internal/modules/cjs/loader.js:529:25)
at Module.require (internal/modules/cjs/loader.js:657:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/hello/Desktop/localBlockchain/node_modules/web3/dist/web3.cjs.js:5:39)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
And I notice the above test code works well on web3.js 1.0.0-beta.37.
The text was updated successfully, but these errors were encountered:
I'm working on Node v11.7.0 and web3.js 1.0.0-beta.38. I just wanted to do a simple test like:
but I've got the following error.
And I notice the above test code works well on web3.js 1.0.0-beta.37.
The text was updated successfully, but these errors were encountered: