Skip to content

Build failed when using Bootstrap 4.0.0 (relese) #9288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amihailes opened this issue Jan 19, 2018 · 9 comments
Closed

Build failed when using Bootstrap 4.0.0 (relese) #9288

amihailes opened this issue Jan 19, 2018 · 9 comments

Comments

@amihailes
Copy link

Hi,

I write this because of #9020 and #9029

When using angular/cli ( "@angular/cli": "1.6.5") with version "bootstrap": "4.0.0-beta.2", Everything is ok: build:dev and build :prod OK:

"build:dev": "ng build",
"build:prod": "ng build --prod --aot --extract-css",

But if I update to "bootstrap": "4.0.0", the build is OK if I use "build:dev", but it doesn't if I try to use "build:prod"

The error is:

node --version
v8.9.4
npm --version
5.6.0

The error:

ERROR in ./node_modules/bootstrap/scss/bootstrap.scss
Module build failed: BrowserslistError: Unknown browser major
at error (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:37:11)
at Function.browserslist.checkName (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:320:18)
at Function.select (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:438:37)
at D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:207:41
at Array.forEach ()
at browserslist (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:196:13)
at D:\spa\node_modules\postcss-merge-rules\dist\index.js:261:51
at LazyResult.run (D:\spa\node_modules\postcss\lib\lazy-result.js:277:20)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:192:32)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
@ multi ./Client/globals.scss ./node_modules/bootstrap/scss/bootstrap.scss
ERROR in ./node_modules/bootstrap/scss/bootstrap.scss
Module build failed: ModuleBuildError: Module build failed: BrowserslistError: Unknown browser major
at error (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:37:11)
at Function.browserslist.checkName (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:320:18)
at Function.select (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:438:37)
at D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:207:41
at Array.forEach ()
at browserslist (D:\spa\node_modules\postcss-merge-rules\node_modules\browserslist\index.js:196:13)
at D:\spa\node_modules\postcss-merge-rules\dist\index.js:261:51
at LazyResult.run (D:\spa\node_modules\postcss\lib\lazy-result.js:277:20)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:192:32)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at LazyResult.asyncTick (D:\spa\node_modules\postcss\lib\lazy-result.js:204:22)
at runLoaders (D:\spa\node_modules\webpack\lib\NormalModule.js:195:19)
at D:\spa\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at D:\spa\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (D:\spa\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at Promise.resolve.then.then.catch (D:\spa\node_modules\postcss-loader\lib\index.js:189:71)
at
@ ./node_modules/bootstrap/scss/bootstrap.scss
@ multi ./Client/globals.scss ./node_modules/bootstrap/scss/bootstrap.scss
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! spa@0.0.0 build:prod: ng build --prod --aot --extract-css
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the spa@0.0.0 build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

My package.json:

"scripts": {
    "ng": "ng",
    "rimraf": "rimraf",
    "clean": "npm cache clean && npm run rimraf -- node_modules doc typings coverage wwwroot",
    "start": "ng serve",
    "build:dev": "ng build",
    "build:prod": "ng build --prod --aot --extract-css",
    "lint:sass": "sass-lint -c .sass-lint.yml Client/**/*.scss --verbose",
    "lint:ts": "tslint -c tslint.json Client/**/*.ts"
},
"dependencies": {},
"devDependencies": {
    "@angular-devkit/core": "0.0.28",
    "@angular/common": "5.2.1",
    "@angular/compiler": "5.2.1",
    "@angular/core": "5.2.1",
    "@angular/forms": "5.2.1",
    "@angular/http": "5.2.1",
    "@angular/platform-browser": "5.2.1",
    "@angular/platform-browser-dynamic": "5.2.1",
    "@angular/router": "5.2.1",
    "@angular/cli": "1.6.5",
    "@angular/compiler-cli": "5.2.1",
    "@types/core-js": "0.9.45",
    "@types/hammerjs": "2.0.35",
    "@types/jasmine": "2.8.4",
    "@types/node": "9.3.0",
    "@types/selenium-webdriver": "3.0.8",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.9",
    "bootstrap": "4.0.0",
    "codelyzer": "4.1.0",
    "core-js": "2.5.3",
    "file-loader": "1.1.6",
    "font-awesome": "4.7.0",
    "isomorphic-fetch": "2.2.1",
    "jquery": "3.2.1",
    "popper.js": "1.12.9",
    "node-sass": "4.7.2",
    "normalize.css": "7.0.0",
    "preboot": "4.5.2",
    "rxjs": "5.5.6",
    "sass-lint": "1.12.1",
    "ts-helpers": "1.1.2",
    "ts-node": "4.1.0",
    "tslint": "5.9.1",
    "typedoc": "0.9.0",
    "typescript": "2.6.2",
    "url-loader": "0.6.2",
    "zone.js": "0.8.20"
}

Thanks

@dinerotah
Copy link
Contributor

See #9020 (comment)

@ghost
Copy link

ghost commented Jan 20, 2018

#9020 (comment) doesn't fix the issue

@waimun
Copy link

waimun commented Jan 20, 2018

Confirmed this is an issue with Bootstrap version 4.0.0 and also 4.0.0-beta.3. Only 4.0.0-beta.2 is ok. There is difference between package.json in bootstrap/node_modules for these versions.

@daviatorstorm
Copy link

Have the same problem

@daviatorstorm
Copy link

Found solution https://stackoverflow.com/a/48200514/2396607

@waimun
Copy link

waimun commented Jan 23, 2018

@daviatorstorm it's a temp solution because end users shouldn't have to update the file manually. I think this issue belongs to bootstrap team but I will defer it to angular-cli since they will know better than us.

@hansl
Copy link
Contributor

hansl commented Jan 24, 2018

Yes, this is a bootstrap issue. Did you file an issue on their github?

@filipesilva
Copy link
Contributor

Thanks for reporting this issue. However, this issue is a duplicate of an existing issue #9020. This bug is fixed in @angular/cli@1.7.0-beta.1.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants