MCPcopy
hub / github.com/webpack/webpack / noModuleIdErrorMessage

Function noModuleIdErrorMessage

lib/RuntimeTemplate.js:54–73  ·  view source on GitHub ↗
(
	module,
	chunkGraph
)

Source from the content-addressed store, hash-verified

52 * @returns {string} error message
53 */
54const noModuleIdErrorMessage = (
55 module,
56 chunkGraph
57) => `Module ${module.identifier()} has no id assigned.
58This should not happen.
59It's in these chunks: ${
60 Array.from(
61 chunkGraph.getModuleChunksIterable(module),
62 (c) => c.name || c.id || c.debugId
63 ).join(", ") || "none"
64} (If module is in no chunk this indicates a bug in some chunk/module optimization logic)
65Module has these incoming connections: ${Array.from(
66 chunkGraph.moduleGraph.getIncomingConnections(module),
67 (connection) =>
68 `\n - ${connection.originModule && connection.originModule.identifier()} ${
69 connection.dependency && connection.dependency.type
70 } ${
71 (connection.explanations && [...connection.explanations].join(", ")) || ""
72 }`
73).join("")}`;
74
75/**
76 * Gets global object.

Callers 5

moduleIdMethod · 0.85
moduleRawMethod · 0.85
moduleNamespaceMethod · 0.85
importStatementMethod · 0.85

Calls 3

identifierMethod · 0.45

Tested by

no test coverage detected