-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng build --prod breaks with an error in css #16875
Comments
This should fix your issue 100% - #{$icon-size-xl} - 1 |
ok thanks I found it in my styles.scss and fixed it @marfehr |
Closing as this seems to have been a user issue. |
Reopening as we should display a more actionable error. |
I had a problem that seems related. The error shown was (only in prod mode):
It was due to an empty |
Its better to atleast show in which file we have the error so that it helps the user to solve it quickly. I made a global search in vscode and I found the error |
I have the same problem:
I found out that it's due to CSS custom properties |
I found the error. However it's not easy because even if the build is set to verbose I had no idea where the problem was. Please, improve the log stack trace where the problem happened. |
Got a similar issue. Please do improve where exactly the issue is so it gets easier to fix them up.
|
1 - Hi. I had some warnings like: Nebular Theme: 1 - FIX: found the problem on my login.component.scss and removed the scss. After that I managed to compile and go up to production. 2 - But now I had to load resource: the server responded with a status of 404 () problem with dlist updloaded. If I fix I will edit this. 2 - FIX: I just remove |
For all those who are using Argon Angular Template (not the dashboard one) Before: 100% - $icon-size-xl - 1 wherever curly braces are not there assets/custom/vendor/_icon.scss |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 bug report
Description
When I run ng build --prod I get an issue:
🔥 Exception or Error
🌍 Your Environment
Angular Version:
Anything else relevant?
My package.json
"dependencies": {
"@angular-devkit/schematics": "^9.0.1",
"@angular/animations": "~9.0.0",
"@angular/cdk": "^9.0.0",
"@angular/common": "~9.0.0",
"@angular/compiler": "~9.0.0",
"@angular/core": "~9.0.0",
"@angular/forms": "~9.0.0",
"@angular/platform-browser": "~9.0.0",
"@angular/platform-browser-dynamic": "~9.0.0",
"@angular/router": "~9.0.0",
"angularx-qrcode": "^2.1.0",
"jwt-decode": "^2.2.0",
"moment": "^2.24.0",
"ngx-bootstrap": "^5.1.2",
"ngx-spinner": "^8.0.3",
"ngx-toastr": "^11.0.0",
"primeicons": "^2.0.0",
"primeng": "^9.0.0-rc.4",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
My log file
[error] JisonLexerError: Lexical error on line 1: Unrecognized text.
Erroneous area:
1: 100% - $icon-size-xl - 1
^.........^
at /Users/akhilgrandhi/Documents/apocfrontend/styles.73840fd418084795d475.css:17:225980
at Object.parseError (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/parser.js:1164:15)
at Object.lexer_parseError [as parseError] (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/parser.js:2297:44)
at Object.lexer_next [as next] (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/parser.js:3292:22)
at Object.lexer_fastLex [as fastLex] (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/parser.js:3367:18)
at fastLex (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/parser.js:1567:27)
at Parser.parse (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/parser.js:1641:30)
at /Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/lib/transform.js:30:30
at walk (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/node_modules/postcss-value-parser/lib/walk.js:19:7)
at ValueParser.walk (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/node_modules/postcss-value-parser/lib/index.js:18:3)
at transformValue (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/lib/transform.js:24:50)
at _default (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/lib/transform.js:59:100)
at /Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss-calc/dist/index.js:25:51
at /Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss/lib/container.js:135:18
at Rule.each (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss/lib/container.js:101:16)
at Rule.walk (/Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss/lib/container.js:131:17)
at /Users/akhilgrandhi/Documents/apocfrontend/node_modules/postcss/lib/container.js:148:24
The text was updated successfully, but these errors were encountered: