Open RationalG opened 8 months ago
I've been banging my head against the wall - thanks for reporting this! I'm having the same issue. Downgrading to 5.0.4
worked!
Any fix here for typescript >5.0.4. I'm getting below error for the typescript 5.2.2
\tsconfig.webpack.json(12,5)
ERR! TS6266: Option 'listFilesOnly' can only be specified on command line.
ERR! Module build failed (from ../../../.store/ts-loader@8.4.0-d2229b2707be7f1686e4/node_modules/ts-loader/index.js):
ERR! Error: error while parsing tsconfig.json
ERR! at Object.loader (node-modules\ts-loader@8.4.0-d2229b2707be7f1686e4\node_modules\ts-loader\dist\index.js:18:18)
It looks like you're using an old version of ts-loader; 8.4.
Also it looks like your code may have an issue?
TS6266: Option 'listFilesOnly' can only be specified on command line.'
This happens here when "esm" is used, which is incompatible with Typescript's use of the ??
operator since 5.0.5+
This is the webpack config file I am using :
Expected Behaviour
Running
webpack --config ./webpack.config.js
with any Typescript version > 5.0.4 should passActual Behaviour
This is what I get when I try running webpack with any Typescript version > 5.0.4 :
Error: Could not load TypeScript. Try installing with
yarn add typescript
ornpm install typescript
. If TypeScript is installed globally, try usingyarn link typescript
ornpm link typescript
.However, this works with any version <= 5.0.4, so, I am not sure what would be the workaround for this.