Skip to content

[ERROR] esbuild .sass files angular 16 #25338

Closed
@LuisAduana

Description

@LuisAduana

Command

serve

Description

I have updated my project to Angular version 16.
Now my .sass files have a compilation error.

Minimal Reproduction

To test the new compilation feature, I modified the line of code in the angular.json file from:

"builder": "@angular-devkit/build-angular:browser"

to:

"builder": "@angular-devkit/build-angular:browser-esbuild"

Exception or Error

The esbuild-based browser application builder ('browser-esbuild') is currently in developer preview and is not yet recommended for production use. For additional information, please see https://angular.io/guide/esbuild
The 'namedChunks' option is not used by this builder and will be ignored.
The 'vendorChunk' option is not used by this builder and will be ignored.
X [ERROR] expected ";".
  ╷
2 │ $wine-color-0: #4C0027
  │              ^
  ╵
  src\assets\sass\abstracts\variables.sass 2:14  @import
  src\assets\sass\main.sass 1:9                  root stylesheet [plugin angular-sass]

    angular:styles/global:styles:4:8:
      4 │ @import 'src/assets/sass/main.sass';
        ╵         ~~~~~~~~~~~~~~~~~~~~~~~~~~~


  ➜  Local:   http://localhost:4200/
Watch mode enabled. Watching for file changes...


### Your Environment

```text
Angular CLI: 16.0.4
Node: 18.10.0
Package Manager: npm 9.6.6
OS: win32 x64

Angular: 16.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.4
@angular-devkit/build-angular   16.0.4
@angular-devkit/core            16.0.4
@angular-devkit/schematics      16.0.4
@schematics/angular             16.0.4
rxjs                            7.8.1
typescript                      5.0.4

Anything else relevant?

The error is not only about the semicolons. If I add them, it gives an error asking me to add curly braces and stop using Sass indentation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions