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
Error TRANSPILED_ESM_CONFIG
provides insufficient information
#4616
Comments
It should be possible to add the original error to the other error message. As by my other post, as transpilation to CommonJS is currently mandatory for TypeScript, a more helpful advice would be to place the config in a sub-folder with a PRs for both improvements are very much welcome. |
Fix at #4621 |
Very cool! Will 3.0 be released soonish? Otherwise quality of life improvements like this should probably also be back ported to the 2.x branch, no? |
It will be released in the next two months. And no, we cannot back port because it is a major breaking change. |
There will probably be another pre-release with the change in the next week. |
Thanks for the info, i really like a transparent and responsive maintenance style! I didn't know you considered a new error type a breaking change. A backwards compatible way would be to enhance the existing error with full information, but I'm happy with a pre release too! |
It is not merely a new error type, this completely changes how modules are loaded. Basically for the TypeScript case, we switched CJS output with ESM output (with the ability to switch back to CJS output), but the same error was also fixed for the plain JavaScript case, where the fix is to no longer bundle in any case, which has very deep implications. |
Ah, i meant to backport only the |
This issue has been resolved via #4621 as part of rollup@3.0.0-5. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4621 as part of rollup@3.0.0-6. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4621 as part of rollup@3.0.0-7. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4621 as part of rollup@3.0.0-8. Note that this is a pre-release, so to test it, you need to install Rollup via |
This issue has been resolved via #4621 as part of rollup@3.0.0. You can test it via |
Rollup Version
2.78.1
Operating System (or Browser)
Linux/Firefox
Node Version (if applicable)
No response
Link To Reproduction
https://replit.com/@flying-sheep/rollup-repro-esm-from-ts
Expected Behaviour
Until fixing the underlying bug #4617, I’d expect the error message to
Offer a solution that actually has a chance of working (I can’t rename a typescript file to .cjs or .mjs)
The actual problem can only be debugged knowing the content of the discarded original error’s message, which tells me which imported module causes the error.
Actual Behaviour
An encountered node error with code
ERR_REQUIRE_ESM
gets converted into a rollup error with codeTRANSPILED_ESM_CONFIG
, in the process discarding vital information to figure out where that happened:rollup/cli/run/loadConfigFile.ts
Lines 127 to 129 in bf1ff32
I encountered this utterly unhelpful error,
The text was updated successfully, but these errors were encountered: