Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic Theme - Vue (Latest version)


Hi,

I get alot of errors/notifications inside Visual Studio Code by TS.

Some examples:
- Open ApiService.ts
- Cannot find module 'vue' or its corresponding type declarations.ts(2307)
- Cannot find module 'axios' or its corresponding type declarations.ts(2307)

What causes this problem? Typescript version? How to solve it?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)

 
Deleted comment

It works in the projects here, tested in version 8.20 metronic, vue3.

Create a file at:
src/shims-vue.d.ts

Code:
declare module '*.vue';



Hi,

Unfortunately, we were not able to reproduce this issue in the latest Metronic version. These imports don't throw any errors. It might be related to your Visual Studio Code used extension or configuration. Could you please specify which vue extensions are you using in your Visual Studio Code?

You might have an error with Visual Studio Code when using a Volar extension it might highlight some components, to fix this you can refer to the GitHub issue below.
https://github.com/johnsoncodehk/volar/discussions/592#discussioncomment-1763880

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(