Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module '@babel/runtime/helpers/classCallCheck' #2225

Closed
inherithandle opened this issue Jan 27, 2019 · 2 comments
Closed

Cannot find module '@babel/runtime/helpers/classCallCheck' #2225

inherithandle opened this issue Jan 27, 2019 · 2 comments

Comments

@inherithandle
Copy link

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:

// package.json
{
  "name": "localBlockchain",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "web3": "^1.0.0-beta.38"
  }
}
// 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.

@studioTeaTwo
Copy link

duplicated with #2221

@nivida
Copy link
Contributor

nivida commented Jan 27, 2019

A similar issue already exits. Thanks for helping us to improve the Web3.js library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants