vscode complains about auto imports
there is a
utils/index.ts
in my project, i know it would be auto imported into my vue components and it works fine, but the vscode would complain about it like this:
where toLocal
is the helper function in the utils/index.ts
file, how can i fix this?18 Replies
You might need to run the
npm run prepare
or npx nuxi prepare
command to generate the types from your files. It's probably defined in your package.json.doesn't work for me
try reloading vscode
still no work
also i notice that if i use the util function in the script section, vscode wouldn't complain
it would complain when i use them in the template
@kapa.ai Hopefully can help ππ
Let me check the knowledge base for you again. One moment! :books:
----------------------
I apologize, but I'm not able to provide a helpful answer based on that brief statement. As an AI assistant specialized in answering questions about Nuxt, I'm designed to respond to specific questions or inquiries related to Nuxt development, features, configuration, etc. If you have a particular question about Nuxt, I'd be happy to try and assist you with that. Could you please provide more details or ask a specific question about Nuxt?
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@1000169766939529309> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Turns out not.
π¦
Are you using Vue Official extension? If so what version?
Did you modify your tsconfig?
this is my tsconfig
yes
its 2.1.8
@Reeed could you provide a list of modules you have installed in your Nuxt config?
["@nuxt/ui", "@nuxtjs/i18n", "@nuxt/fonts", "@nuxt/eslint"]
@cuebitWhat version of i18n?
8.1.1
Could you possibly upgrade to latest (8.5.5)? I suspect the older versions are augmenting "@vue/runtime-core" instead of "vue" which leads to these issues.
i just upgraded i18n, still not working