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

fix: add .js to base protocol import in filter sdk #2009

Merged
merged 1 commit into from
May 14, 2024

Conversation

adklempner
Copy link
Member

Problem

Using @waku/sdk fails in browser with this error:

ERROR in ../../../js-waku/packages/sdk/dist/protocols/filter.js 5:0-50
Module not found: Error: Can't resolve './base_protocol' in '/Users/arseniy/Waku/js-waku/packages/sdk/dist/protocols'
Did you mean 'base_protocol.js'?
BREAKING CHANGE: The request './base_protocol' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

Solution

Add .js to the failing import

Notes

  • Resolves
  • Related to

Contribution checklist:

  • covered by unit tests;
  • covered by e2e test;
  • add ! in title if breaks public API;

@adklempner adklempner requested a review from a team as a code owner May 14, 2024 00:20
Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 181.24 KB (0%) 3.7 s (0%) 1.3 s (-21.83% 🔽) 4.9 s
Waku Simple Light Node 181.32 KB (0%) 3.7 s (0%) 1.3 s (-14.3% 🔽) 4.9 s
ECIES encryption 23.12 KB (0%) 463 ms (0%) 440 ms (+55.08% 🔺) 902 ms
Symmetric encryption 22.53 KB (0%) 451 ms (0%) 573 ms (+9.12% 🔺) 1.1 s
DNS discovery 72.5 KB (0%) 1.5 s (0%) 1.2 s (-13.71% 🔽) 2.6 s
Peer Exchange discovery 74.09 KB (0%) 1.5 s (0%) 1.2 s (+11.07% 🔺) 2.7 s
Local Peer Cache Discovery 67.63 KB (0%) 1.4 s (0%) 678 ms (-43.73% 🔽) 2.1 s
Privacy preserving protocols 38.88 KB (0%) 778 ms (0%) 454 ms (-44.14% 🔽) 1.3 s
Waku Filter 111.72 KB (0%) 2.3 s (0%) 989 ms (-18.61% 🔽) 3.3 s
Waku LightPush 110.26 KB (0%) 2.3 s (0%) 1.2 s (-21.22% 🔽) 3.4 s
History retrieval protocols 110.76 KB (0%) 2.3 s (0%) 1.5 s (+57.92% 🔺) 3.8 s
Deterministic Message Hashing 7.24 KB (0%) 145 ms (0%) 69 ms (-43.43% 🔽) 214 ms

@danisharora099 danisharora099 merged commit 6f188ef into master May 14, 2024
11 checks passed
@danisharora099 danisharora099 deleted the fix/sdk-filter-import branch May 14, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants