WebStorm 7 - Yeoman Angular丢失的源映射`加载资源失败:服务器响应状态为404(未找到)` [英] WebStorm 7 - Yeoman Angular missing sourcemaps `Failed to load resource: the server responded with a status of 404 (Not Found)`

查看:282
本文介绍了WebStorm 7 - Yeoman Angular丢失的源映射`加载资源失败:服务器响应状态为404(未找到)`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行带有WebStorm 7.0.1的yeoman角度发生器grunt服务器抛出:

 加载资源失败:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / jquery / jquery.js.map:0 
无法加载资源:服务器响应的状态为404(未找到)http: //localhost:9000/bower_components/angular/angular.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / bootstrap- sass / js / bootstrap-affix.js.map:0
无法加载资源:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-alert.js.map:0
无法加载资源:服务器响应状态为404(Not Found)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-dropdown。 js.map:0
加载资源失败:服务器响应状态为404(不是找到)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-tooltip.js.map:0
加载资源失败:服务器响应状态为404(未找到)http: //localhost:9000/bower_components/bootstrap-sass/js/bootstrap-modal.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// localhost: 9000 / bower_components / bootstrap-sass / js / bootstrap-transition.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-button.js.map:0
无法加载资源:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-popover.js.map:0
加载资源失败:服务器响应状态为404(未找到)http://www.google-analytics.com/analytics.js.map: 0
加载资源失败:服务器响应状态为404 (未找到)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-typeahead.js.map:0
加载资源失败:服务器响应状态为404(未找到) http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-carousel.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-scrollspy.js.map:0
无法加载资源:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / bootstrap-sass / js / bootstrap-collapse.js.map:0
无法加载资源:服务器响应状态为404(未找到)http:// localhost:9000 / bower_components / bootstrap- sass / js / bootstrap-tab.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// localhost:9000 / scripts / jquery.min.map: 0
无法加载资源:服务器响应状态为4 04(未找到)http:// localhost:9000 / scripts / controllers / main.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// localhost :9000 / scripts / controllers / main.js.map:0
加载资源失败:服务器响应状态为404(未找到)http:// localhost:35729 / livereload.js.map:0

搜索 .js.map 或<在浏览器加载的文件中,code> sourceMappingURL 不会返回任何结果,只有当WebStorm连接到JetBrains IDE支持插件时,才会显示错误,在首次启动时和文件更改实时重新加载时显示。它们显示在IDE的javascript调试控制台中,也显示在浏览器控制台中,但是一旦开发人员工具被打开并且刷新从浏览器完成,就不会引发任何错误(所以我无法检查网络选项卡,除非有一种方法来启动开发人员工具在新的标签加载,编辑:实际上,这也不会工作)。



重现问题的步骤:


  • 安装yeoman角度生成器
  • 从这些源代码创建webstorm项目
  • 使用以下配置启动项目(第二个配置将自动为JS创建):


    lockquote

    节点解释器:pathToNode\\\
    odejs\\\
    ode.exe



    工作目录:ProjectRootFolder



    JavaScript file:C:\Users\UserName\AppData\Roaming\\\
    pm\\\
    ode_modules\grunt-cli\bin\grunt



    应用程序参数:服务器


    http://j.mp/1azrdky



    以及浏览器/实时编辑:


    检查启动后使用JavaScript调试器检查

    开始URL: http:// localhost:9000


    http://j.mp/1azrfJl



    我可以去调试这些错误?感谢您的帮助!

    解决方案

    这些消息只是调试输出:Jetbrains IDE Chrome扩展会检查js的存在。地图文件,如果找不到,则会打印一条消息。此检查的原因是用于压缩/转储代码的一些工具不会生成所需的// sourceMapUrl注释,调试器需要查找源代码映射,因此它会检查映射存在的一些默认位置。所以,这些信息并不表明任何错误,也不会造成任何伤害,因此可以安全地忽略它们。此调试输出将在下一个插件更新中被滤除 - 修复正在进行中


    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!

    解决方案

    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

    这篇关于WebStorm 7 - Yeoman Angular丢失的源映射`加载资源失败:服务器响应状态为404(未找到)`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆