我一直在尝试使用这个角轨生成器设置一个环境:https://github.com/sheniff/generator-angular-rails但当我运行时它总是失败
Grunt test
它说我的 karma 单元出现故障。
我将在下面发布日志
% grunt test
Running "clean:server" (clean) task
Cleaning ".tmp"...OK
Running "coffee:dist" (coffee) task
Running "coffee:test" (coffee) task
Running "compass:dist" (compass) task
directory .tmp/styles
WARNING: 'glyphicons-halflings.png' was not found (or cannot be read) in /Users//Desktop/ang-rails/app/images
WARNING: 'glyphicons-halflings-white.png' was not found (or cannot be read) in /Users/Desktop/ang-rails/app/images
write .tmp/styles/main.css
Running "compass:server" (compass) task
Running "connect:test" (connect) task
Started connect web server on localhost:9000.
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.32 server started at http://localhost:8080/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Mac OS X)]: Connected on socket 97z8INcxrnCo6SHwAAAA with id 66703306
PhantomJS 1.9.8 (Mac OS X): Executed 0 of 0 ERROR (0.001 secs / 0 secs)
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
<小时/>
我真的不认为这是因为我的 CSS 失败了。当我用 sudo 运行它时,我得到
Warning: Task "compass:dist" failed. Use --force to continue.
npm 2.9.1
grunt-cli v0.1.13
咕噜 v0.4.5
凉亭1.4.1
karma 0.12.32
指南针1.0.3(北极星)
ruby 2.2.1p85
phantomjs 2.0.0(这有点奇怪,当我运行“phantomjs --version”时,它返回 2.0.0,但上面的错误消息显示 phantomJS 1.9.8。所以我试图找出为什么存在这种区别。
如果这是非常明显的事情,我错过了我的道歉,我已经搜索了与此类似的问题,但无法找到它。谢谢!
最佳答案
我发现出了什么问题。在 gruntfile.js 中,localhost 设置为 9000 而不是 8080。
关于node.js - 尝试设置 Yeoman Angular-Rails 环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30341686/