我正在尝试运行https://github.com/DaftMonk/mean-chat处托管的演示代码。我下载了存储库。然后我运行了npm install
和bower install
。当我运行grunt服务时,我现在得到这个错误告诉我:
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:9000/scripts/services/mySocket.js". (index):74
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:9000/scripts/directives/autoScroll.js". (index):75
Resource interpreted as Script but transferred with MIME type text/html: "http://localhost:9000/scripts/directives/historyBack.js". (index):77
Uncaught SyntaxError: Unexpected token < mySocket.js:1
Uncaught SyntaxError: Unexpected token < autoScroll.js:1
Uncaught SyntaxError: Unexpected token < historyBack.js:1
Error: [$injector:unpr] Unknown provider: mySocketProvider <- mySocket <- chatroom
http://errors.angularjs.org/1.2.6/$injector/unpr?p0=mySocketProvider%20%3C-%20mySocket%20%3C-hatroom
at http://localhost:9000/bower_components/angular/angular.js:78:12
at http://localhost:9000/bower_components/angular/angular.js:3538:19
at Object.getService [as get] (http://localhost:9000/bower_components/angular/angular.js:3665:39)
at http://localhost:9000/bower_components/angular/angular.js:3543:45
at getService (http://localhost:9000/bower_components/angular/angular.js:3665:39)
at Object.invoke (http://localhost:9000/bower_components/angular/angular.js:3687:13)
at http://localhost:9000/bower_components/angular/angular.js:3544:37
at getService (http://localhost:9000/bower_components/angular/angular.js:3665:39)
at invoke (http://localhost:9000/bower_components/angular/angular.js:3687:13)
at Object.instantiate (http://localhost:9000/bower_components/angular/angular.js:3708:23)
日志:
Running "serve" task
Running "clean:server" (clean) task
Cleaning .tmp...OK
Running "bower-install:app" (bower-install) task
Running "concurrent:server" (concurrent) task
Running "compass:server" (compass) task
directory .tmp/styles/
create .tmp/styles/main.css (2.36s)
Compilation took 2.373s
Done, without errors.
Execution Time (2014-08-04 09:09:39 UTC)
compass:server 2.7s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 2.7s
Running "autoprefixer:dist" (autoprefixer) task
Prefixed file ".tmp/styles/main.css" created.
Running "express:dev" (express) task
Starting background Express server
debugger listening on port 5858
info: socket.io started
Running "open:server" (open) task
Running "watch" task
Waiting...Express server listening on port 9000 in development mode
GET / 200 146ms - 3.72kb
GET /scripts/directives/autoScroll.js 200 10ms - 3.5kb
GET /scripts/services/mySocket.js 200 13ms - 3.5kb
GET /scripts/directives/historyBack.js 200 7ms - 3.5kb
GET /styles/bg.png 304 20ms
GET /partials/main 304 25ms
然后剩余的应用程序无法正常工作。有人可以帮帮我吗?