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
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
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.