"@angular/animations": "^5.1.2", "@angular/common": "^5.1.2", "@angular/compiler": "^5.1.2", "@angular/core": "^5.1.2", "@angular/forms": "^5.1.2", "@angular/http": "^5.1.2", "@angular/platform-browser": "^5.1.2", "@angular/platform-browser-dynamic": "^5.1.2", "@angular/router": "^5.1.2", "bootstrap": "^4.0.0-beta.3", "@angular/cli": "^1.6.3", "@angular/compiler-cli": "^5.1.2", "@angular/language-service": "^5.1.2",
您可以使用Bootstrap 4 beta 3,但首先在node_modules / bootstrap中编辑bootstrap.json / package.json:ERROR in
./node_modules/css-loader?{“sourceMap”:false,”importLoaders”:1}!./node_modules/postcss-loader/lib?{“ident”:”postcss”,”sourceMap”:false}!./node_modules/sass-loader/lib/loader.js?{“sourceMap”:false,”precision”:8,”includePaths”:[]}!./node_modules/bootstrap/scss/bootstrap.scss
Module build failed: BrowserslistError: Unknown browser major
at error (E:*********\node_modules\browserslist\index.js:37:11)
at Function.browserslist.checkName (E:*********\node_modules\browserslist\index.js:320:18)
at Function.select (E:*********\node_modules\browserslist\index.js:438:37)
at E:*********\node_modules\browserslist\index.js:207:41
at Array.forEach ()
at browserslist (E:*********\node_modules\browserslist\index.js:196:13)
at Browsers.parse (E:*********\node_modules\autoprefixer\lib\browsers.js:44:14)
at new Browsers (E:*********\node_modules\autoprefixer\lib\browsers.js:39:28)
at loadPrefixes (E:*********\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
at plugin (E:*********\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
at LazyResult.run (E:*********\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:270:20)
at LazyResult.asyncTick (E:*********\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:185:32)
at LazyResult.asyncTick (E:*********\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:197:22)
at LazyResult.asyncTick (E:*********\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:197:22)
at processing.Promise.then._this2.processed (E:*********\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:224:20)
at new Promise () @ ./node_modules/bootstrap/scss/bootstrap.scss 4:14-164 @ multi
./node_modules/bootstrap/scss/bootstrap.scss
./node_modules/font-awesome/scss/font-awesome.scss
./node_modules/ng2-toastr/bundles/ng2-toastr.min.css
./node_modules/owl.carousel/dist/assets/owl.carousel.css
./node_modules/owl.carousel/dist/assets/owl.theme.default.css
./node_modules/froala-editor/css/froala_editor.pkgd.min.css
./node_modules/froala-editor/css/froala_style.min.css
./node_modules/ng-pick-datetime/assets/style/picker.min.css
./src/styles.scss
“browserslist”: [
“last 1 major version”, <—– delete this line
“>= 1%”, <—– delete this line
“Chrome >= 45”,
“Firefox >= 38”,
“Edge >= 12”,
“Explorer >= 10”,
“iOS >= 9”,
“Safari >= 9”,
“Android >= 4.4”,
“Opera >= 30”
],
看起来在浏览器列表2.4中添加了最后n个主要版本语法,并且在7.0版中将autoprefixer更新为browserList的版本2.
因此,7.0以上的任何版本的autoprefixer都应该有效.
更新autoprefixer也应该为您完成工作.