激活器“404 - 无法加载资源:...”并定位凉亭组件

Activator "404 - Failed to load resource:..." and to locate the bower components

我已经在 angularjs 中构建了一个小型网络应用程序,现在正准备为我的后端使用播放框架。但是,现在在我尝试启动 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  
...

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

只需重新安装 Bower 即可解决问题:

bower install

bower_components是bower自己创建的文件夹。 如果您没有使用 bower install/download 您需要的组件,您将不会拥有该文件夹。

您的示例表明 bootstrap 是与 Bower 一起安装的。你复制了一个例子吗?

如果您的机器上安装了 bower 运行ning,只需 运行 bower install bootstrap,它将为您获取并下载所需的文件。

如果您没有安装 Bower,您需要在此处安装。

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