pkg.exports broken in typescript
See original GitHub issueThis compiled to typescript doesn’t work:
import { v4 } from 'uuid';
v4();
Error:
Error: Package exports for '........ /node_modules/uuid' do not define a valid '.' target
I had to downgrade to v7
_Originally posted by @kryz81 in https://github.com/uuidjs/uuid/issues/245#issuecomment-640027851_
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
New package.json `exports` field not working with TypeScript
The version 13.2 of Node. js allows ESM modules and a new package. json field, called exports , to select and rewrite exported...
Read more >Documentation - Modules - TypeScript
The export = syntax specifies a single object that is exported from the module. This can be a class, interface, namespace, function, or...
Read more >API - esbuild
This changes how the exports field in package.json files is interpreted to prefer node-specific code. If no custom conditions are configured, the Webpack- ......
Read more >Support "exports" field of package.json : WEB-40509 - YouTrack
Open index.js . · Try navigating to definition of HelloDependency from the statement where the instance is constructed. · Delete the import statement...
Read more >TypeScript Exports error breaks Telerik Blazor - Documentation
The cause for the first error is that TypeScript, by default, produces JavaScript code that is designed for use through various package managers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This library only officially supports LTS releases of Node.js (v8, v12, v14).
At this point I would not suggest to stick to Node.js
v13.x
because it already reached end-of-life. Instead upgrade tov14
. Please check https://nodejs.org/en/about/releases/ for details on Node.js versioning semantics.I guess it’s the same problem with very old node 13. Check node v13.14 please.