Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

import type 'type' is declared but its value is never read


import type
'type' is declared but its value is never read.Vetur(6133)
Module '"@/stores/auth"' has no exported member 'type'.Vetur(2305)

import { useAuthStore, type User } from "@/stores/auth";

metronic demo 8
node v18.12.0
npm 9.1.2


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


Hi,

Did you make any changes to our codebase?

Please make sure that you are using the same typescript configuration as it is in the latest Metronic version.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi ,
yes, brother am sure I used same typescript configuration
I didn't change any thing
I talked about the original metronic i mean I didn't make any change
the error in the SignUp.vue
Line number 226
the error under words type User
import { useAuthStore, type User } from "@/stores/auth";
------------------------------------
metronic demo 8
node v18.12.0
npm 9.1.2



Hi,

We rechecked our demos in the latest Metronic version and still without errors with the same node and npm versions.

From your error message, it seems like the problem is with "type" keyword, can you try to remove it?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



the code is running withOut error
and building withOut error
but when i open the component SignIn.vue & SignUp.vue
the error is display in code
i tried remove the "type" keyword
but the error is stay underline "User"
import { useAuthStore,User } from "@/stores/auth";

'User' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.ts(1444)



Hi,

Which code editor are you using?

It seems like you are using Visual Studio Code with the installed Vetur extension which throws this error, try to disable this extension for your workspace.

Also install TypeScript Vue Plugin (Volar) extension.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,

Thank you so much
great ....



Hi,

Glad to hear that it worked for you happy

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(