webpack/webpack · error · Error

Entry ${name} depends on ${dep}, but this entry was not foun

Error message

Entry ${name} depends on ${dep}, but this entry was not found

What it means

Error "Entry ${name} depends on ${dep}, but this entry was not found" thrown in webpack/webpack.

Source

Thrown at lib/Compilation.js:3637

			if (dependOn && runtime) {
				const err =
					new WebpackError(`Entrypoint '${name}' has 'dependOn' and 'runtime' specified. This is not valid.
Entrypoints that depend on other entrypoints do not have their own runtime.
They will use the runtime(s) from referenced entrypoints instead.
Remove the 'runtime' option from the entrypoint.`);
				const entry = /** @type {Entrypoint} */ (this.entrypoints.get(name));
				err.chunk = entry.getEntrypointChunk();
				this.errors.push(err);
			}
			if (dependOn) {
				const entry = /** @type {Entrypoint} */ (this.entrypoints.get(name));
				const referencedChunks = entry
					.getEntrypointChunk()
					.getAllReferencedChunks();
				for (const dep of dependOn) {
					const dependency = this.entrypoints.get(dep);
					if (!dependency) {
						throw new Error(
							`Entry ${name} depends on ${dep}, but this entry was not found`
						);
					}
					if (referencedChunks.has(dependency.getEntrypointChunk())) {
						const err = new WebpackError(
							`Entrypoints '${name}' and '${dep}' use 'dependOn' to depend on each other in a circular way.`
						);
						const entryChunk = entry.getEntrypointChunk();
						err.chunk = entryChunk;
						this.errors.push(err);
						entry.setRuntimeChunk(entryChunk);
						continue outer;
					}

					entry.addDependOn(dependency);

					if (dependency.addChild(entry)) {
						entry.addParent(dependency);

View on GitHub (pinned to 318421ea8a)

Solutions

  1. 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.

When it happens

Trigger: Thrown at lib/Compilation.js:3637 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of webpack/webpack@318421ea8a (2026-08-03). Data as JSON: /data/errors/a1df6be3b83fd908.json. Report an issue: GitHub.