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

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
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 (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
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  :(