Shimo
Shimo
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
Actually I found another issue, it might be due to my filre reference in the typescript.tsConfig, the module decleration from my global.d.ts doesn't take effect.
typescript: {
// typeCheck: true,
tsConfig: {
include: ['./global.d.ts']
}
},
typescript: {
// typeCheck: true,
tsConfig: {
include: ['./global.d.ts']
}
},
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
I removed the export {} The rest of the code in my global.d.ts contains other module and global declaration. My college manage to fixe the issues related to the kalimahapps module by updating the nuxt.config.ts TS config :
typescript: {
// typeCheck: true,
tsConfig: {
include: ['../global.d.ts'],
compilerOptions: {
moduleResolution: 'nodenext',
module: 'NodeNext'
}
}
typescript: {
// typeCheck: true,
tsConfig: {
include: ['../global.d.ts'],
compilerOptions: {
moduleResolution: 'nodenext',
module: 'NodeNext'
}
}
But some other issues appears with primevue imports :
pages/edge/journaux/index.vue:124:33 - error TS2307: Cannot find module '@primevue/core/api' or its corresponding type declarations.

124 import { FilterMatchMode } from '@primevue/core/api';
~~~~~~~~~~~~~~~~~~~~
pages/edge/journaux/index.vue:124:33 - error TS2307: Cannot find module '@primevue/core/api' or its corresponding type declarations.

124 import { FilterMatchMode } from '@primevue/core/api';
~~~~~~~~~~~~~~~~~~~~
For now, our temporary solution will probably be putting the previouse and simpler tsConfig and adding // @ts-expect-error above the kalimahapps imports.
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
If I'm done early on my todays task yes. Meanwhile, here's additional details : My global.d.ts file :
export {};

/* -- Some more code -- */

declare module '@kalimahapps/vue-icons';
export {};

/* -- Some more code -- */

declare module '@kalimahapps/vue-icons';
The error when doing code-check with vue-tsc
pages/edge/connexions/[id].vue:46:29 - error TS2307: Cannot find module '@kalimahapps/vue-icons' or its corresponding type declarations.
There are types at 'C:/Users/hlrb/Documents/Gitlab/vi-edge/node_modules/@kalimahapps/vue-icons/icons/all.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

46 import { BsArrowLeft } from '@kalimahapps/vue-icons';
~~~~~~~~~~~~~~~~~~~~~~~~
pages/edge/connexions/[id].vue:46:29 - error TS2307: Cannot find module '@kalimahapps/vue-icons' or its corresponding type declarations.
There are types at 'C:/Users/hlrb/Documents/Gitlab/vi-edge/node_modules/@kalimahapps/vue-icons/icons/all.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

46 import { BsArrowLeft } from '@kalimahapps/vue-icons';
~~~~~~~~~~~~~~~~~~~~~~~~
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
Hey there, the fix you gave me yesterday seemed to be reliable for the VS Code issue I was having. Thank you. But, I got some additional errors found when doing a code-check with vue-tsc that are supposed to be fixed when my global.d.ts is correctly included in the tsConfig. Can you help me? Here is my typescript field in my nuxt,config.ts :
typescript: {
typeCheck: true,
tsConfig: {
include: ['global.d.ts']
}
}
typescript: {
typeCheck: true,
tsConfig: {
include: ['global.d.ts']
}
}
I tryed using a relative path ./ and ../.
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
I also just though of removing the "include": ["global.d.ts"] of the tsconfig.json. It seems to work fine for now. I'll do some test / postinstalle / prepare to make sure it's not temporary like it has been previously. Thanks 👍
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
@kapa.ai I think this would be going to fare, can I have assistance from a human being ?
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
@kapa.ai None of these recommendation worked. What about now ?
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
@kapa.ai Nevermind, the problem didn't resolved by itself, it just disappeared for a minute. Going on with the proposed solution : 3. I went see the .nuxt/types/imports.d.ts file, the auoimports bugged aren't on this file. 4. I'm on nuxt version ^3.15.0. 5. How can I clear vscode cache ?
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
@kapa.ai Somehow, the issue fixed by it self when I alt-tabed, I couldn't identify clearly what solved it. I ran a nuxi prepare and restarted the TS server. It seems stable. Hwo can I make sure it is ?
36 replies
NNuxt
Created by Shimo on 1/6/2025 in #❓・help
VSCode - TS - Node import issue
1. The nuxi prepare didn't resolved the issue. Here is server/tsconfig.json :
{
"extends": "../.nuxt/tsconfig.server.json",
"include": ["../global.d.ts"]
}
{
"extends": "../.nuxt/tsconfig.server.json",
"include": ["../global.d.ts"]
}
and tsconfig.json :
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
"include": ["global.d.ts"]
}
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
"include": ["global.d.ts"]
}
2. Using the TypeScript config in nuxt.config.ts you gave me didn't help. Here is the config we were using previously :
typescript: {
typeCheck: true
}
typescript: {
typeCheck: true
}
36 replies