Using a variable, type, or namespace that has not been imported or declared.
TypeScript cannot find a declaration for the identifier `X` in the current file scope or global type definitions.
Forgetting to import a component/type, missing global type definitions (e.g. `@types/node` or `@types/react`), or spelling errors.
1// Missing: import { useState } from 'react';2 3export function Counter() {4 const [count, setCount] = useState(0); // Error TS2304: Cannot find name 'useState'5 return <div>{count}</div>;6}1import { useState } from 'react';2 3export function Counter() {4 const [count, setCount] = useState(0);5 return <div>{count}</div>;6}Simulate standard system builds to trigger compiler trace records and track memory crashes locally.
The identifier `useState` is used without an import statement or local declaration in scope.