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 missing file extension in import #331

Merged
merged 1 commit into from
May 22, 2023

Conversation

spalladino
Copy link
Contributor

The missing file extension breaks the package for consumers using node16 module resolution with the following error:

node_modules/@chainsafe/libp2p-noise/dist/src/nonce.d.ts:1:36 - error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './@types/basic.js'?

These errors are easy to miss when using node module resolution in the library. I can set up another PR to update the module resolution to node16 so these are easier to catch, if that's ok.

@spalladino spalladino requested a review from a team as a code owner May 19, 2023 18:27
@mpetrunic mpetrunic merged commit b578438 into ChainSafe:master May 22, 2023
@mpetrunic
Copy link
Member

Thnx!

@spalladino spalladino deleted the fix/file-extension-in-import branch May 22, 2023 09:53
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