以下是许多错误;有一些css错误,我也不知道如何修复,但我现在只关注自己所有错误指向所有javascript库文件中的第一行(由index.html加载) ) - 非常离奇 - 此外,我正在尝试使用node.js盒式磁带在openshift.com上部署我的网站 - 该网站在本地工作正常。
[15:07:07.186] GET http://nodejs-eamonbenproject.rhcloud.com/ [HTTP/1.1 200 OK 349ms]
[15:07:07.634] Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. @ resource://gre/modules/XPIProvider.jsm -> jar:file:///home/yz/.mozilla/firefox/cusyczw9.default/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js -> jar:file:///home/yz/.mozilla/firefox/cusyczw9.default/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/lib/requestNotifier.js:64
[15:07:07.706] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/jquery/dist/jquery.js [HTTP/1.1 200 OK 67ms]
[15:07:07.706] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular/angular.js [HTTP/1.1 200 OK 158ms]
[15:07:07.707] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/bootstrap/dist/js/bootstrap.js [HTTP/1.1 200 OK 194ms]
[15:07:07.708] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-resource/angular-resource.js [HTTP/1.1 200 OK 185ms]
[15:07:07.708] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-cookies/angular-cookies.js [HTTP/1.1 200 OK 228ms]
[15:07:07.709] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-sanitize/angular-sanitize.js [HTTP/1.1 200 OK 160ms]
[15:07:07.710] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-route/angular-route.js [HTTP/1.1 200 OK 234ms]
[15:07:07.710] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/app.js [HTTP/1.1 200 OK 287ms]
[15:07:07.711] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/main.js [HTTP/1.1 200 OK 289ms]
[15:07:07.712] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/navbar.js [HTTP/1.1 200 OK 303ms]
[15:07:07.713] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/login.js [HTTP/1.1 200 OK 306ms]
[15:07:07.714] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/signup.js [HTTP/1.1 200 OK 383ms]
[15:07:07.715] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/settings.js [HTTP/1.1 200 OK 372ms]
[15:07:07.715] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/auth.js [HTTP/1.1 200 OK 417ms]
[15:07:07.716] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/session.js [HTTP/1.1 200 OK 408ms]
[15:07:07.717] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/user.js [HTTP/1.1 200 OK 419ms]
[15:07:07.717] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/directives/mongooseError.js [HTTP/1.1 200 OK 418ms]
[15:07:07.718] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/bootstrap/dist/css/bootstrap.css [HTTP/1.1 200 OK 112ms]
[15:07:07.719] GET http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/styles/main.css [HTTP/1.1 200 OK 190ms]
[15:07:07.775] The stylesheet http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/bootstrap/dist/css/bootstrap.css was not loaded because its MIME type, "text/html", is not "text/css". @ http://nodejs-eamonbenproject.rhcloud.com/
[15:07:07.854] The stylesheet http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/styles/main.css was not loaded because its MIME type, "text/html", is not "text/css". @ http://nodejs-eamonbenproject.rhcloud.com/
[15:07:07.885] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/jquery/dist/jquery.js:1
[15:07:07.885] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular/angular.js:1
[15:07:07.886] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/bootstrap/dist/js/bootstrap.js:1
[15:07:07.886] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-resource/angular-resource.js:1
[15:07:07.896] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-cookies/angular-cookies.js:1
[15:07:07.960] GET http://www.google-analytics.com/analytics.js [HTTP/1.1 304 Not Modified 17ms]
[15:07:07.902] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-sanitize/angular-sanitize.js:1
[15:07:07.902] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-route/angular-route.js:1
[15:07:07.965] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/app.js:1
[15:07:08.148] GET http://www.google-analytics.com/collect?v=1&_v=j19&a=254732770&t=pageview&_s=1&dl=http%3A%2F%2Fnodejs-eamonbenproject.rhcloud.com%2F&ul=en-us&de=UTF-8&sd=24-bit&sr=1280x800&vp=1280x333&je=0&_u=MAC~&cid=1904791542.1398916337&tid=UA-XXXXX-X&z=574136871 [HTTP/1.1 200 OK 16ms]
[15:07:07.980] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/main.js:1
[15:07:07.982] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/navbar.js:1
[15:07:07.984] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/login.js:1
[15:07:08.054] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/signup.js:1
[15:07:08.156] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/settings.js:1
[15:07:08.169] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/auth.js:1
[15:07:08.175] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/session.js:1
[15:07:08.175] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/user.js:1
[15:07:08.175] SyntaxError: syntax error @ http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/directives/mongooseError.js:1
在尝试调试时 - 我决定取出'<'和'>'来自doctype声明只是为了看看会发生什么 - 并且页面加载"!DOCTYPE html"仅(仅在页面顶部的文本中 - 就好像它只是HTML文件中的标准文本一样)。我也ssh进入openshift服务器(我试图从中部署)并找到所有javascript文件的文件路径,并使它们在代码中都是绝对的。
这些与Chrome控制台中打印的错误相同 - 正如您所看到的那样 - 它出现了问题'<'就在index.html开头的doctype标记之前:
Resource interpreted as Stylesheet but transferred with MIME type text/html:
"http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446a…0003a5/app-root/repo/app/bower_components/bootstrap/dist/css/bootstrap.css". nodejs-eamonbenproject.rhcloud.com/:10
Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/styles/main.css". nodejs-eamonbenproject.rhcloud.com/:11
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular/angular.js". (index):27
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/jquery/dist/jquery.js". (index):26
Uncaught SyntaxError: Unexpected token < jquery.js:1
Uncaught SyntaxError: Unexpected token < angular.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446a…a5/app-root/repo/app/bower_components/angular-sanitize/angular-sanitize.js". (index):31
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446a…03a5/app-root/repo/app/bower_components/angular-cookies/angular-cookies.js". (index):30
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/angular-route/angular-route.js". (index):32
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446a…a5/app-root/repo/app/bower_components/angular-resource/angular-resource.js". (index):29
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/app.js". (index):34
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/bower_components/bootstrap/dist/js/bootstrap.js". (index):28
Uncaught SyntaxError: Unexpected token < bootstrap.js:1
Uncaught SyntaxError: Unexpected token < angular-resource.js:1
Uncaught SyntaxError: Unexpected token < angular-cookies.js:1
Uncaught SyntaxError: Unexpected token < angular-sanitize.js:1
Uncaught SyntaxError: Unexpected token < angular-route.js:1
Uncaught SyntaxError: Unexpected token < app.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/main.js". (index):35
Uncaught SyntaxError: Unexpected token < main.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/navbar.js". (index):36
Uncaught SyntaxError: Unexpected token < navbar.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/login.js". (index):37
Uncaught SyntaxError: Unexpected token < login.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/signup.js". (index):38
Uncaught SyntaxError: Unexpected token < signup.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/controllers/settings.js". (index):39
Uncaught SyntaxError: Unexpected token < settings.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/auth.js". (index):40
Uncaught SyntaxError: Unexpected token < auth.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/session.js". (index):41
Uncaught SyntaxError: Unexpected token < session.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/services/user.js". (index):42
Uncaught SyntaxError: Unexpected token < user.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://nodejs-eamonbenproject.rhcloud.com/var/lib/openshift/53619865500446ad820003a5/app-root/repo/app/scripts/directives/mongooseError.js". (index):43
Uncaught SyntaxError: Unexpected token < mongooseError.js:1