TypeScript: error TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.
With verbatimModuleSyntax or isolatedModules, types must be imported/re-exported with import type / export type.
error TS1484: 'User' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.error TS1205: Re-exporting a type when 'isolatedModules' is set requires using 'export type'.TS1484 TS1205 type-only importTS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'. Meaning
Use import type { User } from "./types" or inline import { type User }. Re-exports: export type { User }. This lets transpilers drop type-only imports safely. Switch the option off only if you can't update many files; ESLint consistent-type-imports automates the fix.
Common causes
- Importing types with a normal import under verbatimModuleSyntax
- Re-exporting types without
export type(TS1205) - Interface exported via barrels
- Migration to Vite/SWC
importsNotUsedAsValuesreplaced
⚡ Quick fix
import type { User } from "./types"/import { type User }export type { User } from "./types"- Use ESLint
@typescript-eslint/consistent-type-imports --fix
Detailed fix by platform
TypeScript
import { type User, createUser } from "./users";
How to diagnose
- Kind — Type import?
- Re-export — export type?
- Lint — Autofix?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Cannot find module './App.vue' or its corresponding type declarations TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations.
- Element type is invalid Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined
- Module not found: Can't resolve 'x' (Next.js build) Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src'
Most viewed in TypeScript
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026