1

Here are the many errors; there are a few css errors, which I also don't know how to fix, but I'm only concerning myself now with all the errors pointing to line one of all the javascript library files (loaded by index.html) - very bizarre - also, I am trying to deploy my site on openshift.com with a node.js cartridge - the site works locally fine.

[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

While trying to debug - I decided to take out the '<' and '>' from the doctype declaration just to see what happens - and the page loads with "!DOCTYPE html" only (just in text at the top of the page - as if it were just standard text in an HTML file). I also ssh'ed into the openshift server (which I am trying to deploy from) and found the filepaths to all the javascript files and made them all absolute in the code.

These are the same errors as printed in chrome's console - as you can see - it is having a problem with the '<' right before the doctype tag at the beginning of index.html:

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
ewizard
  • 2,801
  • 4
  • 52
  • 110
  • 1
    Your server is returning `index.html` for every request, including those for JavaScript and CSS - `<` is an unexpected character in those filetypes. You'll need to configure a public folder in your server file. – ncksllvn May 02 '14 at 19:18
  • @ncksllvn thanks! how exactly do i go about doing this for openshift? i have ssh access. – ewizard May 02 '14 at 23:20
  • here is the relevant code i think - i changed: if ('production' === env) { app.use(compression()); app.use(favicon(path.join(config.root, 'public', 'favicon.ico'))); app.use(express.static(path.join(config.root, 'public'))); app.set('views', config.root + '/app/views'); } – ewizard May 02 '14 at 23:28
  • @ncksllvn to: if ('production' === env) { app.use(compression()); app.use(favicon(path.join(config.root, 'public', 'favicon.ico'))); app.use(express.static(path.join(config.root, '/'))); app.set('views', config.root + '/app/views'); } – ewizard May 02 '14 at 23:29
  • @ncksllvn this was a little helpful - i had this problem with my gruntfile - i changed that line back to use public and im pushing to openshift now to test http://stackoverflow.com/questions/21259599/my-angular-node-express-app-serves-index-html-instead-of-static-assets-in-produc – ewizard May 02 '14 at 23:35
  • @ncksllvn the grunt thing wasnt my problem - still getting the errors... – ewizard May 02 '14 at 23:40
  • Can you add your node server file so I can see the setup? – bretcj7 Mar 01 '15 at 20:51

0 Answers0