Activator" 404 - 无法加载资源:..."并找到凉亭组件

时间:2015-01-16 11:25:58

标签: angularjs playframework http-status-code-404 bower

我在angularjs中构建了一个小型webapp,现在即将使用我后端的play框架。但是,现在在我尝试启动Web服务后安装Play(激活器)后,我不断收到有关我的bower组件丢失的错误消息(404 - 未找到)

GET http://localhost:9000/bower_components/bootstrap/dist/css/bootstrap.css
GET http://localhost:9000/bower_components/bootstrap-social/bootstrap-social.css 
GET http://localhost:9000/bower_components/ngDialog/css/ngDialog.css  
...

我猜这只是一个小错误,但无法理解它可能是什么。

2 个答案:

答案 0 :(得分:0)

通过重新安装凉亭来解决它:

bower install

答案 1 :(得分:0)

bower_components是由凉亭自己创建的文件夹。 如果您没有使用bower来安装/下载所需的组件,那么您将没有该文件夹。

您的示例显示引导程序已安装了bower。你复制了一个例子吗?

如果您在机器上运行了凉亭,只需运行bower install bootstrap即可获取并下载所需的文件。

如果您没有安装凉亭,那么您需要做什么。

  1. 安装nodeJS
  2. 运行npm install bower
  3. 运行bower install bootstrap