{"record":{"id":"4ea3795589b3dcb8","repo":"vercel/next.js","slug":"next-should-not-be-imported-directly-imported-i","errorCode":null,"errorMessage":"\"next\" should not be imported directly, imported in ${module.parent?.filename}\nSee more info here: https://nextjs.org/docs/messages/import-next","messagePattern":"\"next\" should not be imported directly, imported in (.+?)\nSee more info here: https://nextjs\\.org/docs/messages/import-next","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/import-next-warning.ts","lineNumber":3,"sourceCode":"import * as Log from '../build/output/log'\n\nLog.warn(\n  `\"next\" should not be imported directly, imported in ${module.parent?.filename}\\nSee more info here: https://nextjs.org/docs/messages/import-next`\n)\n","sourceCodeStart":1,"sourceCodeEnd":6,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/import-next-warning.ts#L1-L6","documentation":"Side-effect warning module: importing it logs this warning when the 'next' server entry was imported directly at runtime (module.parent is set), explaining that user code should never import `next` directly; no exception is thrown.","triggerScenarios":"Thrown at packages/next/src/lib/import-next-warning.ts:3 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not import the \"next\" package directly in your code; use public entry points like next/head, next/link, etc."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}