facebook/react · warning
More than one external source map detected in the source fil
Error message
More than one external source map detected in the source file; skipping "${sourceMappingURL}" What it means
While parsing hook names, loadSourceAndMetadata (packages/react-devtools-shared/src/hooks/parseHookNames/loadSourceAndMetadata.js) scans runtime source code with a sourceMappingURL regex to find external source maps. Well-formed files have exactly one match; if the regex finds several (usually a string literal in the source that looks like a source-map comment, or a concatenated bundle), DevTools cannot tell which is real, so it skips all but the last one and warns per skipped URL. Hook-name resolution then proceeds with the surviving (last) map.
Source
Thrown at packages/react-devtools-shared/src/hooks/parseHookNames/loadSourceAndMetadata.js:239
} else {
externalSourceMapURLs.push(sourceMappingURL);
}
// If the first source map we found wasn't a match, check for more.
sourceMappingURLMatch = withSyncPerfMeasurements(
'sourceMapRegex.exec(runtimeSourceCode)',
() => sourceMapRegex.exec(runtimeSourceCode),
);
}
if (hookSourceAndMetadata.sourceMapJSON === null) {
externalSourceMapURLs.forEach((sourceMappingURL, index) => {
if (index !== externalSourceMapURLs.length - 1) {
// Files with external source maps should only have a single source map.
// More than one result might indicate an edge case,
// like a string in the source code that matched our "sourceMappingURL" regex.
// We should just skip over cases like this.
console.warn(
`More than one external source map detected in the source file; skipping "${sourceMappingURL}"`,
);
return;
}
const {runtimeSourceURL} = hookSourceAndMetadata;
let url = sourceMappingURL;
if (!url.startsWith('http') && !url.startsWith('/')) {
// Resolve paths relative to the location of the file name
const lastSlashIdx = runtimeSourceURL.lastIndexOf('/');
if (lastSlashIdx !== -1) {
const baseURL = runtimeSourceURL.slice(
0,
runtimeSourceURL.lastIndexOf('/'),
);
url = `${baseURL}/${url}`;
}
}View on GitHub (pinned to eafeac097b)
Solutions
- Verify the final bundle has a single //# sourceMappingURL comment at the very end (standard bundler output does).
- If your source contains literal strings that match the pattern, ignore the warning — DevTools uses the last match, which is normally the real one.
- Rebuild so source maps are inline or emitted once (avoid concatenating multiple already-mapped files without a final sourcemap merge).
Defensive patterns
Strategy: fallback
Validate before calling
// Before enabling 'parse hook names', sanity-check the bundle:
const matches = bundleSource.match(/^\/\/# sourceMappingURL=.*/gm) ?? [];
if (matches.length > 1) {
// extra matches are likely string literals; the last one is used by DevTools
console.log('multiple sourceMappingURL candidates:', matches);
} Prevention
- Ship bundles with exactly one //# sourceMappingURL comment at the end.
- Use standard bundler source-map emission rather than concatenating mapped files by hand.
- If your source legitimately contains 'sourceMappingURL' strings, expect and ignore the warning.
When it happens
Trigger: The inspected bundle contains multiple strings matching the sourceMappingURL pattern — e.g. bundler/bootloader source code that embeds such strings, concatenated files, or code that documents source maps in string literals — and you use the 'parse hook names' feature in the Components panel.
Common situations: Debugging bundler-adjacent code, devtools-in-devtools setups, or libraries whose source legitimately contains 'sourceMappingURL' text; bundles produced by naive concatenation of individually mapped files.
Related errors
- Cannot not suspend ID '${suspendedSet[i]}'.
- Could not find instance with id "${id}"
- Could not find element with id "${id}"
- Invalid renderer id "${rendererID}" for element "${id}"
- Invalid renderer id "${match.rendererID}" for element "${mat
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/7fede6311f541db6.
Report an issue: GitHub.