Webpack构建错误,同时包括第三方模块 - 角度4

时间:2018-03-25 05:38:10

标签: angular

我收到了webpack编译错误。我已经使用CLI安装了bootstrap模块并尝试编译。在构建应用程序时,它显示以下错误

我更新了angular-cli.json文件

"styles": [
        "styles.css",
        "../node_modules/bootstrap/dist/css/bootstrap.min.css"
      ],
      "scripts": [
        "../node_modules/jquery/dist/jquery.min.js",
        "../node_modules/popper.js/dist/umd/popper.min.js",
        "../node_modules/bootstrap/dist/js/bootstrap.min.js"
      ],
ERROR in ./~/css-loader?{"sourceMap":false}!./~/postcss-loader!./~/bootstrap/dis
t/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major
    at error (C:\tdog\node_modules\browserslist\index.js:37:11)
    at Function.browserslist.checkName (C:\tdog\node_modules\browserslist\index.
js:320:18)
    at Function.select (C:\tdog\node_modules\browserslist\index.js:438:37)
    at C:\tdog\node_modules\browserslist\index.js:207:41
    at Array.forEach (native)
    at browserslist (C:\tdog\node_modules\browserslist\index.js:196:13)
    at Browsers.parse (C:\tdog\node_modules\autoprefixer\lib\browsers.js:44:14)
    at new Browsers (C:\tdog\node_modules\autoprefixer\lib\browsers.js:39:28)
    at loadPrefixes (C:\tdog\node_modules\autoprefixer\lib\autoprefixer.js:56:18
)
    at plugin (C:\tdog\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
    at LazyResult.run (C:\tdog\node_modules\postcss\lib\lazy-result.js:274:20)
    at LazyResult.asyncTick (C:\tdog\node_modules\postcss\lib\lazy-result.js:189
:32)
    at processing.Promise.then._this2.processed (C:\tdog\node_modules\postcss\li
b\lazy-result.js:228:20)
    at Promise (<anonymous>)
    at LazyResult.async (C:\tdog\node_modules\postcss\lib\lazy-result.js:225:27)

    at LazyResult.then (C:\tdog\node_modules\postcss\lib\lazy-result.js:131:21)
    at Object.module.exports (C:\tdog\node_modules\postcss-loader\index.js:63:10
)
 @ ./~/bootstrap/dist/css/bootstrap.min.css 4:14-130
 @ multi ./src/styles.css ./~/bootstrap/dist/css/bootstrap.min.css
webpack: Failed to compile.

0 个答案:

没有答案