Any one know if this can be fixed with out the esModuleInterop
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 552
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
Think this is caused by the class LRUCache that alos is a namespace. This gets the compiler confused.
node_modules/coap/dist/lib/server.d.ts:11:8 - error TS1259: Module '"coap-service/node_modules/@types/lru-cache/index"' can only be default-imported using the 'esModuleInterop' flag
11 import LRUCache from 'lru-cache';
~~~~~~~~
node_modules/@types/lru-cache/index.d.ts:193:1
193 export = LRUCache;
~~~~~~~~~~~~~~~~~~
This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the TypeScript compiler error involving node_modules/coap/dist/lib/server.d.ts and the @types/lru-cache declaration. Start by inspecting the import at server.d.ts:11 and the reported export at index.d.ts:193; done means the package compiles without requiring esModuleInterop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100