N
Nuxt5mo ago
El Jovial

tsconfig.json Error

Hi all, for some unknown reason my (untouched) tsconfig.json is raising the following error :
Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'
Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'nodenext'
// tsconfig.json
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
// tsconfig.json
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json"
}
Seems like I'm the only one with this error since searching for it didn't gave any Nuxt/Vue related issue, anyone knows where that could be coming from ? Setting up a fresh new nuxt app so I only have vue nuxt and pinia in depedencies
2 Replies
El Jovial
El JovialOP5mo ago
The error seems to be coming from nuxi generated tsconfig that includes : "module": "preserve" Anyone knows where to start to debug that and overwrite nuxi generate tsconfig ? if anyone in the situation, fixed it by adding in nuxt config file :
typescript: {
strict: true,
tsConfig: {
compilerOptions: {
module: "ESNext",
},
},
},
typescript: {
strict: true,
tsConfig: {
compilerOptions: {
module: "ESNext",
},
},
},
RatsClan
RatsClan4w ago
I'm experiencing this too, but unfortunately the above solution doesn't help 🤔 Update: it did work! It just took a long time for VSCode to remove the error message.
Want results from more Discord servers?
Add your server