gpt4 book ai didi

angularjs - Yeoman 和 Bower 未添加 Bootstrap CSS(AngularJS 生成器)

转载 作者:行者123 更新时间:2023-12-02 07:49:17 24 4
gpt4 key购买 nike

我正在关注 codelab在 Yeoman 网页上,到目前为止,我已经成功地遵循了(在我的开发环境运行过程中遇到了一些重大问题,但现在它不会返回任何错误)。

所以我创建了我的项目文件夹并运行yo,选择 AngularJS 并运行它。进入该过程后不久,我就收到了提示?覆盖 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 的事情),然后 gruntserve >。现在 grunt 说已完成,没有错误,但我的页面仅加载 main.css。我强烈感觉 bootstrap.css 文件丢失了。 This就是它看起来的样子,当 Codelab 说明说它应该看起来像 this 时.

如果您需要有关生成内容的更多信息,请参阅 GitHub repository link .

欢迎对我做错了什么(如果有的话)提出任何见解。

最佳答案

完成 Codelab 后,我遇到了完全相同的问题,结果与您得到的结果相同(警告和所有)。我不得不通过回滚到 Bootstrap 3.3.4 来解决这个问题。

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

    "bootstrap": "3.3.4",

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

    bower install
grunt serve

关于angularjs - Yeoman 和 Bower 未添加 Bootstrap CSS(AngularJS 生成器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30946498/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com