1

This is the error while compiling the application. my @angular/cli: 1.2.4 version


@angular/cli: 1.2.4
node: 8.11.1
os: win32 x64
@angular/animations: 4.3.6
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/compiler-cli: 4.3.6
@angular/cli: 1.2.4
@angular/language-service: 4.3.6

This is the error while compiling the application.  



ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?{"ident":"postcss"}!./src/styles.css
Module build failed: BrowserslistError: Unknown browser query `dead`
    at error (C:\Github project\angForm\node_modules\browserslist\index.js:37:11)
    at C:\Github project\angForm\node_modules\browserslist\index.js:222:9
    at Array.forEach (<anonymous>)
    at browserslist (C:\Github project\angForm\node_modules\browserslist\index.js:196:13)
    at Browsers.parse (C:\Github project\angForm\node_modules\autoprefixer\lib\browsers.js:44:14)
    at new Browsers (C:\Github project\angForm\node_modules\autoprefixer\lib\browsers.js:39:28)
    at loadPrefixes (C:\Github project\angForm\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
    at plugin (C:\Github project\angForm\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
    at LazyResult.run (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:274:20)
    at LazyResult.asyncTick (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:189:32)
    at LazyResult.asyncTick (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:201:22)
    at processing.Promise.then._this2.processed (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:228:20)
    at new Promise (<anonymous>)
    at LazyResult.async (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:225:27)
    at LazyResult.then (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:131:21)
    at C:\Github project\angForm\node_modules\postcss-loader\index.js:129:55
 @ ./src/styles.css 4:14-134
 @ multi ./src/styles.css

ERROR in ./src/app/app.component.css
Module build failed: BrowserslistError: Unknown browser query `dead`
    at error (C:\Github project\angForm\node_modules\browserslist\index.js:37:11)
    at C:\Github project\angForm\node_modules\browserslist\index.js:222:9
    at Array.forEach (<anonymous>)
    at browserslist (C:\Github project\angForm\node_modules\browserslist\index.js:196:13)
    at Browsers.parse (C:\Github project\angForm\node_modules\autoprefixer\lib\browsers.js:44:14)
    at new Browsers (C:\Github project\angForm\node_modules\autoprefixer\lib\browsers.js:39:28)
    at loadPrefixes (C:\Github project\angForm\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
    at plugin (C:\Github project\angForm\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
    at LazyResult.run (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:274:20)
    at LazyResult.asyncTick (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:189:32)
    at LazyResult.asyncTick (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:201:22)
    at processing.Promise.then._this2.processed (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:228:20)
    at new Promise (<anonymous>)
    at LazyResult.async (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:225:27)
    at LazyResult.then (C:\Github project\angForm\node_modules\postcss\lib\lazy-result.js:131:21)
    at C:\Github project\angForm\node_modules\postcss-loader\index.js:129:55
 @ ./src/app/app.component.ts 18:17-47
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

1 Answer 1

8

I have upgraded Angular Cli to version 6 and generated a new project. Then tried to use an angular 5 template within this project folder and got the same error as I ran ng serve --open. Deleting the file "browserslist" (it is under the src/) solved my problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.