Ng build fails. CssSyntaxError since 1.7.0-rc.0
See original GitHub issueVersions
Error occurs since v1.7.0-rc.0
Angular CLI: 1.7.0-rc.0
Node: 8.9.4
OS: win32 x64
Angular: 5.2.5
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.7.0-rc.0
@angular-devkit/build-optimizer: 0.3.1
@angular-devkit/core: 0.3.1
@angular-devkit/schematics: 0.3.1
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.0-rc.0
@schematics/angular: 0.3.1
@schematics/package-update: 0.3.1
typescript: 2.6.2
webpack: 3.10.0
Observed behavior
ERROR in ./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./src/assets/styles/page.css
(Emitted value instead of an instance of Error) CssSyntaxError: C:\Users\{omitted}\angular-project\src\assets\styles\page.css:259:2159: Can't resolve '%23linearGradient-1' in 'C:\Users\{omitted}\angular-project\src\assets\styles'
> 259 | background: transparent url("../img/icon.svg") no-repeat 50% 0; ^
260 | }
I get similar error messages for each svg file. The page.css is listed in angular-cli.json styles array.
Repro steps
ng build
Possible breaking commits: https://github.com/angular/angular-cli/commit/4a745c9 https://github.com/angular/angular-cli/commit/fa175d8
Issue Analytics
- State:
- Created 6 years ago
- Reactions:27
- Comments:55 (5 by maintainers)
Top Results From Across the Web
Webpack Error in Angular Project - node.js - Stack Overflow
The issue is @angular/cli@1.7.3 uses Webpack@3.11 which does not recognize the paths in ... Ng build fails. CssSyntaxError since 1.7.0-rc.0
Read more >Angular CLI ng build fails - Visual Studio Feedback
0 application to compile and I just cant. My setup is: An NPM task with custom command to install the angular cli, command:...
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >[warning] expected identifier but found * [css-syntax-error]
On doing ng-build a warning appears due to a wrong ";" --tw-shadow:inset 0 0 30px 0 rgb(0 0 0 / 10%); !important;. Warning:...
Read more >ng build is error after using the artifacts - Atlassian Community
The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0. Please update your Node.js version or visit https://nodejs.org/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is happening with SVG only.
1.7.1
is solving the issue for me, thanks a lot @clydin