Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

TypeError: Common is not a constructor #67

Closed
mobiman1 opened this issue Sep 26, 2019 · 2 comments
Closed

TypeError: Common is not a constructor #67

mobiman1 opened this issue Sep 26, 2019 · 2 comments

Comments

@mobiman1
Copy link

const Common = require('ethereumjs-common');

// Instantiate with only the chain
let c = new Common('ropsten');

This keeps giving me this error:

let c = new Common('ropsten');
        ^

TypeError: Common is not a constructor
@s1na
Copy link
Contributor

s1na commented Sep 26, 2019

Try:

const Common = require('ethereumjs-common').Common;

Refer to release changelog for more info.

@mobiman1
Copy link
Author

Try:

const Common = require('ethereumjs-common').Common;

Refer to release changelog for more info.

Thanks for the link. const Common = require('ethereumjs-common').default fixed it for me.

@s1na s1na closed this as completed Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants