{"record":{"id":"0ddd20a432471d92","repo":"vercel/next.js","slug":"you-can-not-have-a-next-folder-inside-of-your-p","errorCode":null,"errorMessage":"You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict","messagePattern":"You can not have a '_next' folder inside of your public folder\\. This conflicts with the internal '/_next' route\\. https://nextjs\\.org/docs/messages/public-next-folder-conflict","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/dev/next-dev-server.ts","lineNumber":564,"sourceCode":"  ): Promise<void> {\n    await this.ready?.promise\n\n    const { basePath } = this.nextConfig\n    let originalPathname: string | null = null\n\n    // TODO: see if we can remove this in the future\n    if (basePath && pathHasPrefix(parsedUrl.pathname || '/', basePath)) {\n      // strip basePath before handling dev bundles\n      // If replace ends up replacing the full url it'll be `undefined`, meaning we have to default it to `/`\n      originalPathname = parsedUrl.pathname\n      parsedUrl.pathname = removePathPrefix(parsedUrl.pathname || '/', basePath)\n    }\n\n    const { pathname } = parsedUrl\n\n    if (pathname!.startsWith('/_next')) {\n      if (fs.existsSync(pathJoin(this.publicDir, '_next'))) {\n        throw new Error(PUBLIC_DIR_MIDDLEWARE_CONFLICT)\n      }\n    }\n\n    if (originalPathname) {\n      // restore the path before continuing so that custom-routes can accurately determine\n      // if they should match against the basePath or not\n      parsedUrl.pathname = originalPathname\n    }\n    try {\n      return await super.run(req, res, parsedUrl)\n    } catch (error) {\n      const err = getProperError(error)\n      formatServerError(err)\n      this.logErrorWithOriginalStack(err)\n      if (!res.sent) {\n        res.statusCode = 500\n        try {\n          return await this.renderError(err, req, res, pathname!, {","sourceCodeStart":546,"sourceCodeEnd":582,"githubUrl":"https://github.com/vercel/next.js/blob/996f957c060aa17957a166216c69565c72996f4a/packages/next/src/server/dev/next-dev-server.ts#L546-L582","documentation":"Error \"You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict\" thrown in vercel/next.js.","triggerScenarios":"A _next folder exists inside the public folder.","commonSituations":"Copying build output into public/, creating a public/_next that conflicts with the internal route.","solutions":["Rename or remove the public/_next folder; it conflicts with Next.js internal routes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"996f957c060aa17957a166216c69565c72996f4a","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}