Skip to content

Error in ES module resolution #172

Open

Description

@zero1zero

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!

Activity

  1. zero1zero commented on Nov 21, 2024

    @zero1zero
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions