当我运行命令
时ng build
似乎一切都好。
但是当我跑步时
ng build --prod
我收到以下错误:
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser query `>= 1%`
at error (/var/www/parseek.admin/front/node_modules/postcss-merge-rules/node_modules/browserslist/index.js:37:11)
at /var/www/parseek.admin/front/node_modules/postcss-merge-rules/node_modules/browserslist/index.js:222:9
at Array.forEach (native)
at browserslist (/var/www/parseek.admin/front/node_modules/postcss-merge-rules/node_modules/browserslist/index.js:196:13)
at /var/www/parseek.admin/front/node_modules/postcss-merge-rules/dist/index.js:261:51
at LazyResult.run (/var/www/parseek.admin/front/node_modules/postcss/lib/lazy-result.js:277:20)
at LazyResult.asyncTick (/var/www/parseek.admin/front/node_modules/postcss/lib/lazy-result.js:192:32)
at LazyResult.asyncTick (/var/www/parseek.admin/front/node_modules/postcss/lib/lazy-result.js:204:22)
....
我用npm install
安装了bootstrap。 bootstrap.min.css
有什么问题!?
答案 0 :(得分:0)
正如@ Z.bagley评论的那样,我通过以下命令升级了angular cli
。
npm install --save-dev @angular/cli@1.7.0-beta.1
问题解决了。