question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing `types` declaration for exports in rakkasjs@next package.json

See original GitHub issue

The exports defined here are missing the types field to point typescript to the right location. Without it typescript complains:

image

Adding "types": "./dist/index.d.ts" to the top of this field in rakkas’ package.json resolved this issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
IgnusGcommented, Jul 20, 2022

I hope this + typesVersions from next.8 works with both "moduleResolution": "Node" and "moduleResolution": "NodeNext".

Yes it does. Skip next.8 and try next.9, it should work now.

Thanks @cyco130! Can confirm it works on .9

1reaction
cyco130commented, Jul 20, 2022

I hope this + typesVersions from next.8 works with both "moduleResolution": "Node" and "moduleResolution": "NodeNext".

Yes it does. Skip next.8 and try next.9, it should work now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Declare Missing Types for External Libraries -- newline
Custom Types Declaration#. First, in your tsconfig.json add a directory path to type declarations:.
Read more >
New package.json `exports` field not working with TypeScript
json field, called exports , to select and rewrite exported files. Before 13.2, I was importing files from the dist folder of my...
Read more >
Support for NodeJS 12.7+ package exports #33079 - GitHub
I am quite literally pointing at the type declaration file with a neon sign and ... Support package.json exports outside of Node #50794....
Read more >
Modules: Packages | Node.js v19.3.0 Documentation
Exports sugar; Subpath imports; Subpath patterns; Conditional exports ... A package.json "type" value of "module" tells Node.js to interpret .js files ...
Read more >
How to Create a Hybrid NPM Module for ESM and CommonJS.
You read about the package.json type = "module" and exports keywords which will magically make everything work, but they don't work as ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found