laravelvue.jssasscompass-sass

SassError: Undefined function Laravel Vue


I am trying to install all the dependencies of a Laravel Vue Project.

From the Instruction, it says I need to run npm run dev. Now when I run this I am receiving

> ERROR in ./resources/js/src/@core/scss/vue/libs/toastification.scss
> (./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./node_modules/sass-loader/dist/cjs.js??ref--11-0!./resources/js/src/@core/scss/vue/libs/toastification.scss)
> Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
> SassError: Undefined function.    ╷ 63 │       margin-left:
> -(math.div($vt-toast-max-width, 2));    │                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ╵  
> node_modules/vue-toastification/src/scss/_toastContainer.scss 63:22 
> @import   resources/js/src/@core/scss/vue/libs/toastification.scss
> 25:9        root stylesheet  @
> ./resources/js/src/@core/scss/vue/libs/toastification.scss 2:14-314  @
> ./resources/js/src/libs/toastification.js  @
> ./resources/js/src/main.js  @ ./resources/js/app.js  @ multi
> ./resources/js/app.js ./resources/scss/app.scss

I have searched to solve this problem and some people suggested that in the package-lock.json file there are sass dependencies where I need to provide a resolved link to it. But when I check my sass package I found this -

"sass": {
    "version": "1.32.13",
    "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.13.tgz",
    "integrity": "sha512-dEgI9nShraqP7cXQH+lEXVf73WOPCse0QlFzSD8k+1TcOxCMwVXfQlr0jtoluZysQOyJGnfr21dLvYKDJq8HkA==",
    "dev": true,
    "requires": {
        "chokidar": ">=3.0.0 <4.0.0"
    },

Now I have no idea where to look and how to solve this problem! Any IDEA???


Solution

  • try to delete everything in toastification.scss and if it works, then you're having just a syntax error