Skip to content

fix: missing import extension#388

Merged
mpetrunic merged 1 commit intoChainSafe:masterfrom
hackyguru:patch-1
Nov 27, 2023
Merged

fix: missing import extension#388
mpetrunic merged 1 commit intoChainSafe:masterfrom
hackyguru:patch-1

Conversation

@hackyguru
Copy link
Copy Markdown
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
Copy Markdown

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

@mpetrunic
Copy link
Copy Markdown
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
@achingbrain
Copy link
Copy Markdown
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
Copy Markdown
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