Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Warning: -file- is being assigned a //# sourceMappingURL, but already has one

我們的志工尚未將此文章翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!

Message

Warning: -file- is being assigned a //# sourceMappingURL, but already has one.

Error type

A warning. JavaScript execution won't be halted.

What went wrong?

A source map has been specified more than once for a given JavaScript source.

JavaScript sources are often combined and minified to make delivering them from the server more efficient. With source maps, the debugger can map the code being executed to the original source files. There are two ways to assign a source map, either by using a comment or by setting a header to the JavaScript file.

Examples

Setting a source map by using a comment in the file:

//# sourceMappingURL=https://example.com/path/to/your/sourcemap.map

Or, alternatively, you can set a header to your JavaScript file:

X-SourceMap: /path/to/file.js.map

See also

文件標籤與貢獻者

 此頁面的貢獻者: fscholz
 最近更新: fscholz,