使用 WebStorm 7.0.1 运行 yeoman 角度生成器 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
在浏览器加载的文件中搜索.js.map
或搜索sourceMappingURL
不会返回任何结果,并且在项目源中没有与错误中的这些文件相关的结果。
仅当 WebStorm 连接到 JetBrains IDE 支持插件、初始启动和文件更改实时重新加载时,才会显示错误。它们显示在 IDE 的 javascript 调试控制台和浏览器控制台中,但是一旦打开开发人员工具并从浏览器完成刷新,就不会抛出任何错误(因此我无法在网络选项卡,除非有办法在新选项卡加载时启动开发人员工具,编辑:实际上这也不起作用)。
重现问题的步骤:
- 安装 yeoman 角度发生器
- 从这些来源创建一个 webstorm 项目
- 使用以下配置启动项目(将为 JS 自动创建第二个配置):
节点解释器:pathToNode\nodejs\node.exe
工作目录:ProjectRootFolder
JavaScript 文件:C:\Users\UserName\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt
应用参数:服务器
对于浏览器/实时编辑:
检查启动后
用 JavaScript 调试器检查
开始网址:
http://localhost:9000
关于如何调试这些错误的任何想法?谢谢您的帮助!