当前位置: 首页 > 面试题库 >

Yeoman和Bower不添加Bootstrap CSS(AngularJS生成器)

公孙宸
2023-03-14
问题内容

我正在跟踪Yeoman网页上的一个代码实验室,到目前为止,我已经设法进行了跟踪(有一些主要的障碍使我的开发环境得以发展,但现在它不返回任何错误)。

因此,我制作了我的项目文件夹并运行yo,选择AngularJS并运行该程序。相当快地进入该过程,我得到一个提示? Overwrite package.json?y并回答了以下警告:

npm WARN package.json codelab@0.0.0 No license field.
npm WARN peerDependencies The peer dependency karma@>=0.9 included from karma-jasmine will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency jasmine-core@* included from karma-jasmine will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma@>=0.9 included from karma-phantomjs-launcher will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency phantomjs@>=1.9 included from karma-phantomjs-launcher will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency karma@~0.12.0 included from grunt-karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN optional dep failed, continuing fsevents@0.3.6

之后,它完成了所要做的工作,所以我bower install再次运行以确保(由于package.json的原因),然后运行grunt serve。现在grunt说完成了,没有错误,但是我的页面只加载了main.css。我强烈感觉bootstrap.css文件丢失。这是什么样子,当代码实验室指示说,应该像这样。

如果您需要有关生成内容的更多信息,请访问GitHub存储库链接。

欢迎对我做错的事情有任何见解(如有)。


问题答案:

完成代码实验室后,我遇到了与您得到的警告和所有结果完全相同的问题。我只能通过回退到Bootstrap 3.3.4来解决此问题。

只需编辑bower.json并将Bootstrap行更改为:

    "bootstrap": "3.3.4",

然后运行以下命令,它应该可以工作:

    bower install
    grunt serve


 类似资料:
  • 本文向大家介绍Angularjs 与 bower安装和使用详解,包括了Angularjs 与 bower安装和使用详解的使用技巧和注意事项,需要的朋友参考一下 bower安装和使用 入门级安装 直接上手 准备工作: 安装nodejs 通过nodejs 安装cnpm 详细过程 1.安装完nodejs 执行node -v 查看版本号 项目需求(建议)4.4.7 2.执行 cnpm -v (淘宝镜像)

  • 这在某个时间点上很有效,但我有一个用例,在应用程序运行时可以添加用户。 我可以通过哪种方法(通过控制器/服务)进行启动后操作?我想它可能是(它包含方法),但我不确定如何引用或配置它。

  • 我在试着设置QAF。早些时候,当我设置框架时,我可以在控制台和输出日志文件中看到驱动程序日志。但现在我看不到他们了。我没有在日志文件配置或它的目录中做任何更改。有人能给我一些建议吗?

  • 我想知道如何在StringBuilder中插入umlaut(“).. HTML文本:::: C# 由于'navigation.html'html不能正常工作...我需要追加“navigation.html”, 我想听听你的很多想法... 比如使用字符..等等。:)

  • 1. 历史、现状和发展 1.1 历史背景 通常在开发新项目时我们都需要配置工程环境,开发目录,需要下载一些库、框架文件(如 jQuery、Backbone 等),配置编译环境(Less、Sass、Coffeescript等),甚至还要配置单元测试框架,过程非常繁琐。 在没有实现前端工程化的年代,前端代码的组织都是纯手工维护的。比如我要做一个网站页面,那么我需要手动创建一个文件夹来存放代码文件,我把

  • Yeoman是一个强健的工具,库,及工作流程的组合,帮你网页开发者快速创建出漂亮而且引人入胜的网页程序 功能特性如下: 快速创建骨架应用程序——使用可自定义的模板(例如:HTML5、Boilerplate、Twitter Bootstrap等)、AMD(通过RequireJS)以及其他工具轻松地创建新项目的骨架。 自动编译CoffeeScrip和Compass——在做出变更的时候,Yeoman的L