{"id":"a1df6be3b83fd908","repo":"webpack/webpack","slug":"entry-name-depends-on-dep-but-this-entry-wa","errorCode":null,"errorMessage":"Entry ${name} depends on ${dep}, but this entry was not found","messagePattern":"Entry (.+?) depends on (.+?), but this entry was not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/Compilation.js","lineNumber":3637,"sourceCode":"\t\t\tif (dependOn && runtime) {\n\t\t\t\tconst err =\n\t\t\t\t\tnew WebpackError(`Entrypoint '${name}' has 'dependOn' and 'runtime' specified. This is not valid.\nEntrypoints that depend on other entrypoints do not have their own runtime.\nThey will use the runtime(s) from referenced entrypoints instead.\nRemove the 'runtime' option from the entrypoint.`);\n\t\t\t\tconst entry = /** @type {Entrypoint} */ (this.entrypoints.get(name));\n\t\t\t\terr.chunk = entry.getEntrypointChunk();\n\t\t\t\tthis.errors.push(err);\n\t\t\t}\n\t\t\tif (dependOn) {\n\t\t\t\tconst entry = /** @type {Entrypoint} */ (this.entrypoints.get(name));\n\t\t\t\tconst referencedChunks = entry\n\t\t\t\t\t.getEntrypointChunk()\n\t\t\t\t\t.getAllReferencedChunks();\n\t\t\t\tfor (const dep of dependOn) {\n\t\t\t\t\tconst dependency = this.entrypoints.get(dep);\n\t\t\t\t\tif (!dependency) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Entry ${name} depends on ${dep}, but this entry was not found`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tif (referencedChunks.has(dependency.getEntrypointChunk())) {\n\t\t\t\t\t\tconst err = new WebpackError(\n\t\t\t\t\t\t\t`Entrypoints '${name}' and '${dep}' use 'dependOn' to depend on each other in a circular way.`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst entryChunk = entry.getEntrypointChunk();\n\t\t\t\t\t\terr.chunk = entryChunk;\n\t\t\t\t\t\tthis.errors.push(err);\n\t\t\t\t\t\tentry.setRuntimeChunk(entryChunk);\n\t\t\t\t\t\tcontinue outer;\n\t\t\t\t\t}\n\n\t\t\t\t\tentry.addDependOn(dependency);\n\n\t\t\t\t\tif (dependency.addChild(entry)) {\n\t\t\t\t\t\tentry.addParent(dependency);","sourceCodeStart":3619,"sourceCodeEnd":3655,"githubUrl":"https://github.com/webpack/webpack/blob/318421ea8ac81371f5171236a6efb63675576528/lib/Compilation.js#L3619-L3655","documentation":"Error \"Entry ${name} depends on ${dep}, but this entry was not found\" thrown in webpack/webpack.","triggerScenarios":"Thrown at lib/Compilation.js:3637 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the entry's 'dependOn' array: every name listed must correspond to another entry defined in the configuration. Add the missing entry or fix the name in dependOn."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"318421ea8ac81371f5171236a6efb63675576528","analyzedAt":"2026-08-03T19:39:56.731Z","schemaVersion":2}