Skip to content
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 in ES module resolution #172

Open
zero1zero opened this issue Nov 21, 2024 · 1 comment
Open

Error in ES module resolution #172

zero1zero opened this issue Nov 21, 2024 · 1 comment

Comments

@zero1zero
Copy link

Getting the following error trying to use ES module in the "transform" field:

evalmachine.<anonymous>:385
                        throw new tsp.TsPatchError(`tsconfig.json > plugins: "${configTransformValue}" does not have an export "${importKey}": ` +
                        ^
TsPatchError: tsconfig.json > plugins: "test" does not have an export "default": {}
    at TspPlugin.createFactory (evalmachine.<anonymous>:385:31)
    at PluginCreator.createProgramTransformers (evalmachine.<anonymous>:294:56)
    at Object.createProgram (evalmachine.<anonymous>:582:55)
    at createProgram (evalmachine.<anonymous>:125324:41)
    at getBuilderCreationParameters (evalmachine.<anonymous>:129626:18)
    at createEmitAndSemanticDiagnosticsBuilderProgram (evalmachine.<anonymous>:130294:5)
    at createIncrementalProgram (evalmachine.<anonymous>:132016:10)
    at performIncrementalCompilation (evalmachine.<anonymous>:131970:30)
    at performIncrementalCompilation2 (evalmachine.<anonymous>:135212:22)
    at executeCommandLineWorker (evalmachine.<anonymous>:134986:7) {
  diagnostic: undefined
}

This was previously mentioned here: #58 (comment), with example failing code here: https://github.com/colecrouter/ts-patch-repro

Is this caused by user error or an ongoing defect? Unclear if this was ever resolved or what the cause of the error is.

Thanks!

@zero1zero
Copy link
Author

Worth noting that switching to commonjs for my plugin resolved this particular issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant