ng build之后出错--prod --base-href / abc /

时间:2018-02-19 04:36:43

标签: angular angular2-forms angular4-forms

我尝试为生产环境构建我的angular 4应用程序并运行“ng build --prod --base-href / abc /”命令得到以下错误并且我已将bootstrap版本更改为4.0.0.0-beta-2同样的错误也是如此。

ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major
    at error (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:37:11)
    at Function.browserslist.checkName (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:320:18)
    at Function.select (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:438:37)
    at C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:207:41
    at Array.forEach (<anonymous>)
    at browserslist (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:196:13)
    at C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\dist\index.js:261:51
    at LazyResult.run (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:277:20)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:192:32)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
 @ multi ./node_modules/bootstrap/dist/css/bootstrap.min.css ./src/styles.css
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: ModuleBuildError: Module build failed: BrowserslistError: Unknown browser major
    at error (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:37:11)
    at Function.browserslist.checkName (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:320:18)
    at Function.select (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:438:37)
    at C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:207:41
    at Array.forEach (<anonymous>)
    at browserslist (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:196:13)
    at C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-merge-rules\dist\index.js:261:51
    at LazyResult.run (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:277:20)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:192:32)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at LazyResult.asyncTick (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss\lib\lazy-result.js:204:22)
    at runLoaders (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\webpack\lib\NormalModule.js:195:19)
    at C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\loader-runner\lib\LoaderRunner.js:364:11
    at C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\loader-runner\lib\LoaderRunner.js:230:18
    at context.callback (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at Promise.resolve.then.then.catch (C:\Users\Gurpreet_Singh29\Practice Work\SOPID\SOP\node_modules\postcss-loader\lib\index.js:189:71)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
 @ ./node_modules/bootstrap/dist/css/bootstrap.min.css
 @ multi ./node_modules/bootstrap/dist/css/bootstrap.min.css ./src/styles.css

0 个答案:

没有答案