You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to include web3-validator package in client-side code.
Actual behavior
If you try to include the web3-validator package in a client-side codebase, the bundling of the source code fails on following error:
Error: While trying to resolve module web3-validator from file .../node_modules/web3-utils/lib/commonjs/formatter.js, the package .../node_modules/web3-validator/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (.../node_modules/web3-validator/dist/web3-validator.min.js).
The problem seems to be caused by browser property defined in web3-validator/package.json refering to dist/web3-validator.min.js. Since the dist folder is not part of the package, the compilation fails.
Steps to reproduce the behavior
Include the web3-validator package to any frontend project.
Try to compile the code.
Logs
Error message mentioned above.
Environment
React-native, Metro bundler, Mac OS
The text was updated successfully, but these errors were encountered:
Expected behavior
It is possible to include web3-validator package in client-side code.
Actual behavior
If you try to include the
web3-validator
package in a client-side codebase, the bundling of the source code fails on following error:The problem seems to be caused by
browser
property defined inweb3-validator/package.json
refering todist/web3-validator.min.js
. Since the dist folder is not part of the package, the compilation fails.Steps to reproduce the behavior
web3-validator
package to any frontend project.Logs
Error message mentioned above.
Environment
The text was updated successfully, but these errors were encountered: