-
-
Notifications
You must be signed in to change notification settings - Fork 911
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
pkg.exports broken in typescript #466
Comments
@kryz81 what typescript version and config are you using? |
Typescript 3.8.3 Config: { |
I may be running into this issue as well. I'm using uuid as a CommonJS module with Node.js, and I installed it using
The uuid version is 8.1.0, and the Node.js version is 13.3.0. |
@ryanprince Node 13 is unstable version and not supported. But technically you have very old one. The latest v13.14.0 works as expected. |
Okay, thanks for your help! |
Reproduction case for uuidjs/uuid#466
@kryz81 this is strange, I cannot reproduce the issue. Would you mind checking out https://github.com/ctavan/uuid-example-typescript and comparing that to your code? I copy & pasted your Works well for me™:
|
With your repo I got the same error using Node 13.x. But when I switched to Node 14.x the error disappeared! With Node 12.x it works too... 🤔 |
This comment has been minimized.
This comment has been minimized.
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 |
We have experienced similar issues within our angular/ionic application. The config we use is
Project was building fine, but then the package was generating nan-undefined values. I was trying to replicate this on example repo, but with no luck. |
@oneserve what's the exact error message you are seeing? I've pushed an update to https://github.com/ctavan/uuid-example-typescript with the config you are mentioning and it all works just fine on my machine (Node.js What happens if you clone that repo and run:
? |
@ctavan
|
If this is an issue that you can only reproduce in a single environment/machine my best guess is that something is off with that particular environment/machine. Maybe something with globally installed dependencies?! Did you run |
Of course, I did |
This compiled to typescript doesn't work:
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 #245 (comment)
The text was updated successfully, but these errors were encountered: