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

missing web3-validator/dist folder #7015

Closed
PeKne opened this issue Apr 30, 2024 · 1 comment · Fixed by #7016
Closed

missing web3-validator/dist folder #7015

PeKne opened this issue Apr 30, 2024 · 1 comment · Fixed by #7016
Labels
4.x 4.0 related

Comments

@PeKne
Copy link
Contributor

PeKne commented Apr 30, 2024

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:

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

  1. Include the web3-validator package to any frontend project.
  2. Try to compile the code.

Logs

Error message mentioned above.

Environment

  • React-native, Metro bundler, Mac OS
@SantiagoDevRel
Copy link
Member

Hi @PeKne thanks for submitting the issue and PR, the team will review it asap, please keep an eye on the PR in case anything needs to be changed💪💪

@mconnelly8 mconnelly8 added the 4.x 4.0 related label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants