webpack/webpack · error · TypeError

Logger.getChildLogger(name) called with a function not retur

Error message

Logger.getChildLogger(name) called with a function not returning a name

What it means

Error "Logger.getChildLogger(name) called with a function not returning a name" thrown in webpack/webpack.

Source

Thrown at lib/Compiler.js:444

					this.infrastructureLogger(name, type, args);
				}
			},
			(childName) => {
				if (typeof name === "function") {
					if (typeof childName === "function") {
						return this.getInfrastructureLogger(() => {
							if (typeof name === "function") {
								name = name();
								if (!name) {
									throw new TypeError(
										"Compiler.getInfrastructureLogger(name) called with a function not returning a name"
									);
								}
							}
							if (typeof childName === "function") {
								childName = childName();
								if (!childName) {
									throw new TypeError(
										"Logger.getChildLogger(name) called with a function not returning a name"
									);
								}
							}
							return `${name}/${childName}`;
						});
					}
					return this.getInfrastructureLogger(() => {
						if (typeof name === "function") {
							name = name();
							if (!name) {
								throw new TypeError(
									"Compiler.getInfrastructureLogger(name) called with a function not returning a name"
								);
							}
						}
						return `${name}/${childName}`;
					});

View on GitHub (pinned to 318421ea8a)

Solutions

  1. Ensure the function passed to logger.getChildLogger returns a non-empty string name, or pass the name string directly.

When it happens

Trigger: Thrown at lib/Compiler.js:444 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/e4e419f09a87ac90.json. Report an issue: GitHub.