-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
@parcel/transformer-typescript-types throws a "Got unexpected undefined" error when using a re-exported type #7360
Comments
Hey! I also received this same error, though I don't have the slightest clue where it is coming from. @jakeboone02 I was able to bypass this error by following the workaround in the description for #5735 listed here. For some reason by adding the following to my
Again, not sure why this fixes it, but I figured it might be able to help you out as this issue gets investigated. |
Thanks @olipyskoty, but doesn't that prevent the types from being generated at all? |
is this problem solved, I still having similar issue here parcel 2.3.2 setting target type to false works but we need the declaration file |
this is still an issue for me using parcel 2.5.0 EDIT: |
Still fails in 2.6.2.
|
Do not use global types from d.ts source declare in typescript files like a
|
parcel@2.7.0 @parcel/transformer-typescript-types@2.7.0 still fails, any solutions? |
Even if there is no explanation for this, thanks for sharing as it helped me to solve this problem in my project. |
This just completely disables the generation of a types file in Parcel. So you'll have to write index.d.ts yourself or generate it by some other means. |
🐛 bug report
@parcel/transformer-typescript-types
throws aGot unexpected undefined
error when using a re-exported type/interface in a React component. I'm not sure that's the root cause but it's the only way I can reproduce the erro consistently.In this minimal example repo, look at the
src/controls/ValueEditor.tsx
file, which has a working line (commented out) and a non-working line. Both lines should work.🎛 Configuration (.babelrc, package.json, cli command)
Running
yarn build
throws the error, even after deleting.parcel-cache
. I do not have a.babelrc
.package.json
:tsconfig.json
:🤔 Expected Behavior
Parcel should not error out.
😯 Current Behavior
💁 Possible Solution
N/A
🔦 Context
Trying to migrate the react-querybuilder repo from webpack to Parcel + monorepo. See parcel branch for current attempt.
💻 Code Sample
Example repo. Clone,
cd
to the new folder, then runyarn && yarn build
.🌍 Your Environment
The text was updated successfully, but these errors were encountered: