Tuesday 26 September 2023

Debug Failure. Unhandled SyntaxKind: ImportClause

I'm trying to build a React app using Webpack inside Docker container.

Running the command webpack --mode production --progress --config webpack.prod.js ends up with the following error:

ERROR in ./src/app/App.tsx
Module build failed (from ./node_modules/ts-loader/index.js):
Error: Debug Failure. Unhandled SyntaxKind: ImportClause.
    at pipelineEmitWithHintWorker (/app/node_modules/typescript/lib/typescript.js:114180:22)
    at pipelineEmitWithHint (/app/node_modules/typescript/lib/typescript.js:113711:17)
    at pipelineEmitWithSourceMaps (/app/node_modules/typescript/lib/typescript.js:117731:13)
    at pipelineEmitWithComments (/app/node_modules/typescript/lib/typescript.js:117399:13)
    at pipelineEmit (/app/node_modules/typescript/lib/typescript.js:113651:13)
    at emitExpression (/app/node_modules/typescript/lib/typescript.js:113635:13)
    at emitImportDeclaration (/app/node_modules/typescript/lib/typescript.js:115606:13)
    at pipelineEmitWithHintWorker (/app/node_modules/typescript/lib/typescript.js:113912:32)
    at pipelineEmitWithHint (/app/node_modules/typescript/lib/typescript.js:113711:17)
    at pipelineEmitWithSourceMaps (/app/node_modules/typescript/lib/typescript.js:117731:13)
 @ ./src/index.tsx 5:0-36 13:36-39

Running the same command to build on host machine (MacOS) works as expected. The container runs on node:16.13.1-alpine official image.



from Debug Failure. Unhandled SyntaxKind: ImportClause

No comments:

Post a Comment