Home > OS >  Angular - Module build failed, when running project
Angular - Module build failed, when running project

Time:08-04

I'm working with an Angular template that i downloaded it from this site : https://gogodl.com/b2c555c5a6cb207b/vuexy-vuejs-html-laravel-admin-dashboard-template-8.2.zip

I had run npm install successfuly. Then when i wanted to run ng serve i had this error :

./src/styles.scss - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Undefined function.
  ╷
9 │   @include border-radius(math.div($border-radius, 2));
  │                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  src\@core\scss\base\bootstrap-extended\_code.scss 9:26  @import
  src\@core\scss\base\bootstrap-extended.scss 21:9        @import
  src\@core\scss\core.scss 7:9                            @import
  src\styles.scss 1:9                                     root stylesheet
    at processResult (E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\webpack\lib\NormalModule.js:701:19)
    at E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\webpack\lib\NormalModule.js:807:5
    at E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\loader-runner\lib\LoaderRunner.js:400:11
    at E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\loader-runner\lib\LoaderRunner.js:252:18
    at context.callback (E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\loader-runner\lib\LoaderRunner.js:124:13)
    at Object.callback (E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\sass-loader\dist\index.js:54:7)
    at Worker.<anonymous> (E:\SOS\TP\ANGULAR_Projects\secure_vde_dachboard_template\node_modules\@angular-devkit\build-angular\src\sass\sass-service.js:134:25)
    at Worker.emit (events.js:223:5)
    at MessagePort.<anonymous> (internal/worker.js:142:55)
    at MessagePort.emit (events.js:223:5)

CodePudding user response:

This is problem with sass. Probably u have old sass version in package.json. Try this solution

  • Related