A issue in the this.web3 = new Web3(window.web3.currentProvider);the web3.js has output and I type to the code of console.log(window.web3.currentProvider)that window.web3.currentProvider is defined. But the terminal occurs issue like as fellow:

ERROR in src/app/app.service.ts(36,20): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.

enter image description here

I import the web3.js like that :enter preformatted text here

  • I import the web3.js like that : import * as Web3 from 'web3';
    – Allen Kris
    Mar 25, 2018 at 7:53
  • Environment: system:Ubuntu16.04 web.js:"1.0.0-beta.33"
    – Allen Kris
    Mar 25, 2018 at 7:53
  • Any news on that? Got the same error
    – k102
    Apr 27, 2018 at 14:39

1 Answer 1


Managed to fix this by changing import to import Web3 from 'web3';

Hope it helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.