WebStorm 7 - Yeoman Angular missing sourcemaps `Failed to load resource: the server responded with a status of 404 (Not Found)`

孤街浪徒 提交于 2019-12-11 05:46:24

问题


Running the yeoman angular generator grunt server with WebStorm 7.0.1 throws:

Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/jquery/jquery.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/angular/angular.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-affix.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-alert.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-dropdown.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-tooltip.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-modal.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-transition.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-button.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-popover.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://www.google-analytics.com/analytics.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-typeahead.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-carousel.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-scrollspy.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-collapse.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-tab.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/scripts/jquery.min.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/scripts/controllers/main.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:9000/scripts/controllers/main.js.map:0
Failed to load resource: the server responded with a status of 404 (Not Found)      http://localhost:35729/livereload.js.map:0

Searching for .js.map or sourceMappingURL in browser loaded files returns no result and in the project source no result related to those files from the error.

The errors are shown only when WebStorm is connected to the JetBrains IDE Support plugin, on initial launch and on file changes live reload. They are shown in the javascript debug console in the IDE and also in the browser console, but once the developer tools are opened and the refresh is done from the browser there are no errors thrown (so I can't check the request initiator in the network tab, unless there is a way to start developer tools on new tab load, EDIT: actually that wouldn't work either).

Steps to reproduce the problem:

  • install yeoman angular generator
  • create a webstorm project from those sources
  • start the project using the following configuration (a 2nd configuration will be automatically created for JS):

Node interpreter: pathToNode\nodejs\node.exe

Working directory: ProjectRootFolder

JavaScript file: C:\Users\UserName\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt

Application param: server

http://j.mp/1azrdky

and for Browser / Live Edit:

check After launch

check with JavaScript debugger

start url: http://localhost:9000

http://j.mp/1azrfJl

Any ideas about how I could go about debugging these errors? Thank you for your help!


回答1:


These messages are just the debug output: the Jetbrains IDE Chrome extension checks for presence of js.map files, and, if not found, prints a message. The reason for this checking is that some tools used to compress/transpile code don't generate required //sourceMapUrl comment the debugger needs to locate sourcemaps, so it checks some default locations for maps presence. So, these messages don't indicate any errors and don't do any harm, they can be safely ignored. This debug output will be filtered out in the next plugin update - fix is in progress




回答2:


Since as lena mentioned the errors are not relevant I installed the Grep Console and added a match to colorize the errors in green so they won't draw attention.

http://j.mp/18SDYjC

http://j.mp/18SE4aU

I tried filtering them out but I'm not sure why that doesn't work.



来源:https://stackoverflow.com/questions/19769069/webstorm-7-yeoman-angular-missing-sourcemaps-failed-to-load-resource-the-ser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!