Error map
Jest ESM Jest: SyntaxError: Cannot use import statement outside a module (Jest encountered an unexpected token)
React · layer 1, On your device
Centre: this error. First ring: errors it is linked with (7). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.
Directly related (7)
Warning: An update to Component inside a test was not wrapped in act(...)
A component updated state after the test’s synchronous assertions — async work wasn’t awaited.
SyntaxError: Cannot use import statement outside a module
An `import` statement ran in a context treated as CommonJS (Node without "type": "module", a browser script without type="module"…
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
CommonJS code used `require()` on a package that is ES-module-only (node-fetch 3, chalk 5, nanoid 4, got 12…).
TestingLibraryElementError: Unable to find an element with the text: x
getBy* found no matching element in the rendered output.
TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module needs an import attribute of "type: json"
An ES module imported a .json file without the required import attribute.
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
Node tried to run a TypeScript file as ESM without a TypeScript loader.
Angular tests: Error: Expected to be running in 'ProxyZone', but it was not found.
`fakeAsync` / `waitForAsync` was used, but the test environment's zone testing setup is missing.
Two steps away (17)
Node.js: [UnhandledPromiseRejection] — This error originated either by throwing inside of an async function without a catch block
A promise rejected and nothing handled it; since Node 15 this crashes the process.
SyntaxError: await is only valid in async functions and the top level bodies of modules
await was used inside a function that isn’t async (or in a classic, non-module script).
AbortError: The user aborted a request. / signal is aborted without reason
A fetch was cancelled through an AbortController (or the browser cancelled it).
Error: Cannot find module 'x' (MODULE_NOT_FOUND)
Node can’t resolve the module path — the package isn’t installed, or a relative path/extension is wrong.
ReferenceError: x is not defined
Code refers to a variable or function name that doesn’t exist in the current scope.
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
An Express/Node handler tried to send a second response (or set headers) after one was already sent.
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './x' is not defined by "exports"
You imported a deep path inside a package that its package.json "exports" field doesn’t expose.
Warning: A component is changing an uncontrolled input to be controlled
An input’s `value` started as `undefined` (uncontrolled) and later became a defined value (controlled), or vice versa.
Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?
A component returns two sibling JSX elements without a single parent.
Warning: Cannot update a component (`Parent`) while rendering a different component (`Child`)
A child component updated a parent’s state during its render instead of in an effect or event handler.
DeprecationWarning: Buffer() is deprecated due to security and usability issues (DEP0005)
Code (yours or a dependency) uses the deprecated new Buffer() constructor.
TS2307: Cannot find module 'x' or its corresponding type declarations.
TypeScript can’t resolve the import — the package isn’t installed, the path alias isn’t configured, or there are no types.
TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type.
The JavaScript package has no TypeScript types bundled and no @types package installed.
TS2304: Cannot find name 'x'.
TypeScript doesn’t know an identifier — a missing import, missing type definitions (e.g. for Node or Jest globals), or a typo.
Angular: Error: Cannot find control with name: 'email' (reactive forms)
A `formControlName` points at a control that does not exist in the bound `FormGroup`.
Angular build: Error: bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 120.00 kB with a total of 1.12 MB
The production build is larger than the size limits (budgets) in angular.json, and the build is configured to fail.
Angular CLI: Schema validation failed with the following errors: Data path "" must NOT have additional properties(xyz)
`angular.json` (or an option you passed to a builder) contains a property the schema does not allow — a typo, an option removed i…
Map another error
Popular: 4035004000xC000007BTypeErrorCritical error404NullPointerException