0

I recently updated my Angular application to version 15. However, when I run the ng serve command, I encounter the following error:

 ./src/assets/css/sass/themes/vien.dark.bluenavy.scss?ngGlobalStyle:1:0 -Error: Module parse failed: Unexpected character '@' (1:0) 
 File was processed with these loaders:
 * ./node_modules/resolve-url-loader/index.js
 * ./node_modules/sass-loader/dist/cjs.js You may need an additional loader to handle the result of these loaders.
> @charset "UTF-8";
| /* Vien Main Style
|

Things to note:

  • I do not have a custom Webpack configuration in my application.
  • I searched through my application and confirmed that I do not have any @charset declaration.
  • I've tried updating all my dependencies to the latest versions, but the error persists.

Steps I've tried:

  • Updated all dependencies using npm update.

  • Searched for @charset declarations throughout my application.

Does anyone have any idea how to fix this issue or what might be causing it?

this is my angular.json file

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "Vien-Angular": {
      "projectType": "application",
      "schematics": {
        "@schematics/angular:component": {
          "style": "scss"
        }
      },
      "root": "",
      "sourceRoot": "src",
      "prefix": "app",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist/Vien-Angular",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.app.json",
            "assets": [
              "src/favicon2.png",
              "src/assets",
              "src/manifest.webmanifest"
            ],
            "styles": [
              "src/assets/css/vendor/bootstrap.min.css",
              "src/assets/css/vendor/bootstrap.rtl.only.min.css",
              "./node_modules/@glidejs/glide/dist/css/glide.core.min.css",
              "./node_modules/quill/dist/quill.snow.css",
              "./node_modules/quill/dist/quill.bubble.css",
              "./node_modules/@ng-select/ng-select/themes/default.theme.css",
              "./node_modules/ngx-bootstrap/datepicker/bs-datepicker.css",
              "./node_modules/nouislider/distribute/nouislider.min.css",
              "./node_modules/angular-archwizard/archwizard.css",
              "./node_modules/angular-calendar/css/angular-calendar.css",
              "./node_modules/ngx-lightbox/lightbox.css",
              "./node_modules/video.js/dist/video-js.min.css",
              
            
              {
                "input": "src/assets/css/sass/themes/vien.dark.bluenavy.scss",
                "bundleName": "dark.blue.navy",
                "inject": true
              }
            
            ],
            "scripts": [],
            "vendorChunk": true,
            "extractLicenses": false,
            "buildOptimizer": false,
            "sourceMap": true,
            "optimization": false,
            "namedChunks": true
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "namedChunks": false,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2mb",
                  "maximumError": "5mb"
                },
                {
                  "type": "anyComponentStyle",
                  "maximumWarning": "6kb",
                  "maximumError": "10kb"
                }
              ],
              "serviceWorker": true,
              "ngswConfigPath": "ngsw-config.json"
            }
          },
          "defaultConfiguration": ""
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "Vien-Angular:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "Vien-Angular:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "Vien-Angular:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "tsconfig.spec.json",
            "karmaConfig": "karma.conf.js",
            "assets": [
              "src/favicon2.png",
              "src/assets",
              "src/manifest.webmanifest"
            ],
            "scripts": []
          }
        },
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "e2e/protractor.conf.js",
            "devServerTarget": "Vien-Angular:serve"
          },
          "configurations": {
            "production": {
              "devServerTarget": "Vien-Angular:serve:production"
            }
          }
        }
      }
    }
  },
  "cli": {
    "analytics": false
  }
}

0 Answers0