WebStorm 7 – Yeoman Angular丢失的源映射`加载资源失败:服务器响应状态为404(Not Found)

使用WebStorm 7.0.1运行yeomanangular发生器grunt服务器抛出:

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 

在浏览器加载的文件中search.js.mapsourceMappingURL不会返回任何结果,并且在项目源中没有与错误中的文件相关的结果。

仅当WebStorm连接到JetBrains IDE支持插件时,才会显示错误,在初始启动时和文件更改实时重新加载时显示。 它们显示在IDE中的javascriptdebugging控制台中,也显示在浏览器控制台中,但是一旦开发人员工具被打开并且从浏览器进行刷新,就不会引发任何错误(所以我不能检查networking选项卡,除非有一种方法来启动开发人员工具新标签加载,编辑:实际上,这也不会工作)。

重现问题的步骤:

  • 安装yeomanangular发生器
  • 从这些来源创build一个webstorm项目
  • 使用以下configuration启动项目(第二个configuration将自动为JS创build):

节点解释器:pathToNode \ nodejs \ node.exe

工作目录:ProjectRootFolder

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

应用程序参数:服务器

http://j.mp/1azrdky

和浏览器/现场编辑:

检查启动后

检查与JavaScriptdebugging器

启动url: http://localhost:9000

http://j.mp/1azrfJl

任何关于如何去debugging这些错误的想法? 感谢您的帮助!

这些消息只是debugging输出:Jetbrains IDE Chrome扩展检查是否存在js.map文件,如果未find,则会打印消息。 这种检查的原因是用于压缩/传输代码的一些工具不会生成所需的/ sourceMapUrl注释,debugging器需要查找源代码映射,因此它会检查映射存在的一些默认位置。 所以,这些信息并不表示有任何错误,也没有任何伤害,可以安全地忽略。 该debugging输出将在下一个插件更新中被滤除 – 修复正在进行中

由于莱纳提到的错误是不相关的,我安装了Grep控制台,并添加了一个匹配,绿色的错误着色,所以他们不会引起注意。

http://j.mp/18SDYjC

http://j.mp/18SE4aU

我试图过滤出来,但我不知道为什么这不起作用。