Web3.js: NodeJS Web3 1.0.0-beta.38 and 1.0.0-beta.39: Cannot find module '@babel/runtime/helpers/classCallCheck'

Created on 27 Jan 2019  Â·  6Comments  Â·  Source: ChainSafe/web3.js

Hi!

Web3 1.0.0-beta.37 did work fine with all my systems. But now, after upgrading to 1.0.0-beta.38 it stopped working. Even after a clean install into a new empty folder, it doesn't work on my Mac, also tried Ubuntu 14.04 LTS with same results. As you can see from the output below, it really is a system-agnostic bug related to the require() + npm module directory resolver, so, most likely, a problem somewhere in the web3.js codebase itself.

+ [email protected]
added 298 packages from 205 contributors in 38.338s
[+] no known vulnerabilities found [15378 packages audited]
> const Web3 = require('web3')
Error: Cannot find module '@babel/runtime/helpers/classCallCheck'
    at Function.Module._resolveFilename (module.js:542:15)
    at Function.Module._load (module.js:472:25)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
>
$ uname -a
Darwin mbp.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
$ node --version
v9.2.0
$ npm --version
6.0.0

Questions:

  • Why is that babel stuff missing after a clean install?
  • What would be a proper workaround for this issue?
bug

Most helpful comment

Same issue for me. I did npm install --save @babel/runtime and then it worked well.

All 6 comments

Same issue for me. I did npm install --save @babel/runtime and then it worked well.

@kroitor Thanks for submitting this issue! I've fixed it in: https://github.com/ethereum/web3.js/pull/2227 this PR should get released today or tomorrow morning. I apologize for the troubles you had.

@patidarmanoj10 Thanks for providing a workaround that fast.

@nivida This still seems to be an issue in version 1.0.0-beta.39. Should the @babel/runtime dependency be added to web3.js/packages/web3/package.json instead of web3.js/package.json?

I can confirm the results of @negaex – still getting the same (identical) issue with 1.0.0-beta.39.

@nivida I still confirm the same issue still exits in "web3": "^1.0.0-beta.39"

Please deprecate versions beta.38 and beta.39, which reproduce this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joeriexelmans picture joeriexelmans  Â·  3Comments

connectdotz picture connectdotz  Â·  3Comments

imthatcarlos picture imthatcarlos  Â·  3Comments

zamoore picture zamoore  Â·  3Comments

webersson picture webersson  Â·  3Comments