使用bower安装BootStrap 4.0.0-beta.2的问题

时间:2017-11-09 19:06:47

标签: twitter-bootstrap bootstrap-4 bower-install

我在Node

上执行了以下命令
  

bower install bootstrap#4.0.0-beta.2

我收到以下错误

bower not-cached    https://github.com/twbs/bootstrap.git#4.0.0-beta.2
bower resolve       https://github.com/twbs/bootstrap.git#4.0.0-beta.2
bower download      https://github.com/twbs/bootstrap/archive/v4.0.0-beta.2.tar.gz
bower extract       bootstrap#4.0.0-beta.2 archive.tar.gz
bower EMALFORMED    Failed to read 
C:\Users\taddesee\AppData\Local\Temp\ALPHA-
taddesee\bower\ca4c50b905dc21ea17a10549a6f5944f-14096-5CqNOR\bower.json

Additional error details:
Unexpected token @ in JSON at position 0

有人可以帮助我,如果他们以前遇到过这个问题吗?谢谢你的帮助。

1 个答案:

答案 0 :(得分:6)

Bootstrap v4将不再可以通过Bower(related GitHub pull request)安装;相反,用Yarn或NPM安装它。

# With NPM
$ npm install --save bootstrap@v4.0.0-beta.2

# With Yarn
$ yarn add bootstrap@v4.0.0-beta.2