-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Angular 16+ and Web3js 4.0+ problem solving #6326
Comments
I've reproduced the error. I will investigate it deeper. thx for your contribution. |
Thanks. I appreciate it! Let me know if there are any investigations I can help with on my end. |
So the problem is
(window as any).process = {
env: { DEBUG: undefined },
}; here is related issues and threads: |
Thank you for your help on this @avkos we have tried both suggestions and ended up landing on doing option
This gets it all working well especially if the Web3 library is used in a deeper service inside Angular. |
Follow up question. Should this remain the long term solution for Angular or is there a patch that could be worked on to assist with this? |
this is a temp solution. we will fix this bug inside library |
That's great news! Looking forward to it |
I believe this issue is fixed as we removed polyfills from library, closing |
Expected behavior
npm install web3
app.component
Actual behavior
/node_modules/isomorphic-ws/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
Uncaught ReferenceError: process is not defined
Steps to reproduce the behavior
ng new my-first-project
(needs angular cli)Logs
Included above.
Environment
@angular version ^16.1.0 (the latest version)
web3 version ^4.0.3
npm version 9.8.1
node versoin 18.15.0
The text was updated successfully, but these errors were encountered: