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

Update import syntax for web3 #6006

Closed
1 task done
spacesailor24 opened this issue Apr 11, 2023 · 1 comment
Closed
1 task done

Update import syntax for web3 #6006

spacesailor24 opened this issue Apr 11, 2023 · 1 comment
Assignees
Labels
4.x 4.0 related Documentation Relates to project wiki or documentation

Comments

@spacesailor24
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What would you like to say about Web3.js' documentation?

Docs mention user must import web3 using: import { web3 } from 'web3'; when currently the only supported syntax is import Web3 from 'web3';

Examples/References

This line

@spacesailor24 spacesailor24 added Documentation Relates to project wiki or documentation 4.x 4.0 related labels Apr 11, 2023
@nikoulai nikoulai self-assigned this May 15, 2023
@nikoulai
Copy link
Contributor

During the migration in truffle, I had to use the {} syntax, or I would get the TypeError: Web3 is not a constructor error. Please see my comment:

trufflesuite/truffle#5393 (comment)

@nikoulai nikoulai removed their assignment May 15, 2023
@luu-alex luu-alex self-assigned this May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Documentation Relates to project wiki or documentation
Projects
None yet
Development

No branches or pull requests

3 participants