core
core copied to clipboard
A declaration file cannot be imported without 'import type'
Describe the bug Adding the NuxtHub module to the latest version of Nuxt (3.13.2) gives an error when combined with vue-tsc typechecking. Output error;
ERROR
ERROR(vue-tsc) A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '/home/projects/github-tlv5io/node_modules/@nuxthub/core/dist/runtime/base/server/utils/hooks' instead?
FILE undefined:
undefined
[vue-tsc] Found 1 error. Watching for file changes.
Steps to reproduce Reproduction on StackBlitz: https://stackblitz.com/edit/github-tlv5io
Steps to reproduce the behavior:
- Start new nuxt project
- Add the nuxthub module using
npx nuxi module add hub
- Add typescript and vue-tsc dev deps
- Set typechecking in nuxt.config.ts;
typescript: {
typeCheck: true,
},
- Run dev (
npm run dev
)
Expected behavior No typescript errors.