javascript - How can I get rid of the error "Unsupported format of the sourcemap" while loading jquery-migrate.min.js? -


i getting following error message in visual studio 2013 debug window:

'iexplore.exe' (script): loaded http://localhost:4453/scripts/lib/jquery-migrate.min.js

unsupported format of sourcemap

module load messages turned on (debug window context menu). know there should jquery-migrate.min.js.map file, unfortunately not distributed jquery team.

now tried use empty file, , tried use jquery.min.map file (simply renaming copy jquery-migrate.min.js.map), both don't work.

i have looked on jquery site, provide map file jquery not jquery-migrate: download map file jquery 2.1.4

since file not available download (or did @ wrong location), how can create such file scratch? seems json formatted file.

note: there information available @ stackoverflow site map files (see bootstrap-3-1-1-what-is-the-map-extension-file-used-for). , give idea syntax of sourcemaps, can read this: source map revision 3 proposal

unfortunately, trying mimick sourcemap using information proposal did not help, error message still shown.

what tried creating file jquery-migrate.min.js.map in same path minified file jquery-migrate.min.js:

{"version":3, "file":"jquery-migrate.min.js", "sources":["jquery-migrate.js"], "names":["$"],"mappings":";eaaizkc"}

(no idea how mapping code being calculated)

unfortunately, did not help.

then thought suppress error message changing file jquery-migrate.min.js in following way:

i.e., commented out line

//@ sourcemappingurl=dist/jquery-migrate.min.map

so file looks (the code below truncated easier reading, note last line /*---disabled: //@ sourcemappingurl=dist/jquery-migrate.min.map ---*/):

/*! jquery migrate v1.1.1 | (c) 2005, 2013 jquery foundation, inc. , other contributors | jquery.org/license */ jquery.migratemute===void 0&&(jquery.migratemute=!0),function(e,t,n){function r(n){o[n]||(o[n]=!0,e.migratewarning....................

/---disabled: //@ sourcemappingurl=dist/jquery-migrate.min.map ---/

but error message still occurred. astro gave me right hint (see answer). thank you!


note (to reviewers changed message above): error message thrown visual studio , link local link points iisexpress. don't change error message.

share|improve question
up vote 2 down vote accepted

the jquery-migrate.min.js.map there can debug jquery minified library. needs there development purpose production don't need whole line. dont know why have included line in js.

you can safely delete whole line.

i dont know vs2013 php projects run gulp task on file jquery.js remove line before concatenating other js libraries,

share|improve answer
    
yes, same achieved creating bundles in asp.net/mvc visual studio. concatenate , minify files reducing amount of bytes , number of streams when loading code. – matt jun 19 '15 @ 12:08
    
oh can write task there remove on build ! – astroanu jun 19 '15 @ 12:10
1  
actually, done when switch "release" , build solution. issue occurs in "debug" mode, because there vs not touch files can debug code more easily. ideally, if vs distinguish between .min.js , .js grab unminified files debugging , minified files release. – matt jun 19 '15 @ 12:13

your answer

 
discard

posting answer, agree privacy policy , terms of service.

not answer you're looking for? browse other questions tagged or ask own question.

Comments