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

Typescript error: The '@codedread/bitjs' library may need to update its package.json or typings #49

Open
kilterskjalg opened this issue Feb 26, 2024 · 3 comments
Labels

Comments

@kilterskjalg
Copy link

Hi.

I get this error:
Typescript error: There are types at 'node_modules/@codedread/bitjs/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@codedread/bitjs' library may need to update its package.json or typings

The error goes away if I find package.json in node_modules/@coderead and replace:

"exports": "./index.js"

with

"exports": [
    "./index.js",
    "./types/index.d.ts" 
  ],
@codedread
Copy link
Owner

codedread commented Feb 26, 2024

I have not done a serious amount of research on this yet, but can you clarify if your project is using CJS or ESM-type modules? It would be helpful to provide a link to a minimal project where this does not work properly (package.json, tsconfig.json and one file that tries to use @codedread/bitjs

@codedread codedread added the bug label Feb 26, 2024
@codedread
Copy link
Owner

Here's a possible way to fix: thomasbrodusch/vitest-fail-on-console#10

@codedread
Copy link
Owner

@kilterskjalg - can you please read the above comment and answer the question there?

@codedread codedread pinned this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants