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: missing import extension #388

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

hackyguru
Copy link
Contributor

@hackyguru hackyguru commented Nov 22, 2023

This package is a dependency for https://github.com/waku-org/js-waku

But, due to the import on 'src/crypto/index.browser.ts' - import { pureJsCrypto } from './.js', the CRA does not work. Fixed this by modifying the import

Steps to reproduce

  1. Create a react app with npx create-react-app <project-name>
  2. Install the waku sdk package from npm install @waku/sdk
  3. Package installation fails and throws up the error because of the invalid import

This is a major issue because CRA will not along with package

@hackyguru hackyguru requested a review from a team as a code owner November 22, 2023 15:41
@mpetrunic mpetrunic changed the title Fixing imports to make the library work on CRA fix: missing import extension Nov 22, 2023
@fryorcraken
Copy link

@hackyguru I think it would be good if you add the steps to reproduce the issue.

@mpetrunic
Copy link
Member

@achingbrain @wemeetagain Should we add rule in ipfs eslint config to error when import is missing extension?

@mpetrunic mpetrunic merged commit e4013e4 into ChainSafe:master Nov 27, 2023
13 checks passed
@achingbrain
Copy link
Collaborator

That's annoying. This module is imported during tests but because it's only used in browser testing it's run through esbuild first which I guess doesn't care about the missing extension?

@mpetrunic
Copy link
Member

That's annoying. This module is imported during tests but because it's only used in browser testing it's run through esbuild first which I guess doesn't care about the missing extension?

Nope

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.

5 participants