Search code examples
next.jssass

NextJS 15.0.2 - Failed to compile


I upgraded my nextJS website to 15.0.2 but I get this error :

Creating an optimized production build ...
Failed to compile.

./src/app/[locale]/path/file.module.scss
_0_0.call$1 is not a function

Import trace for requested module:
./src/app/[locale]/path/file.module.scss
./src/app/[locale]/path/file.tsx    

> Build failed because of webpack errors
  • Every packages have been updated.
  • I tried to delete .next and node_modules. Then reinstalling them, but I still get the same error.

I wonder if it is coming from SASS, but not sure of anything… Thank you


Solution

  • Okay, this was coming from the option "fiber" from sassOptions in the next.config.js file:

    sassOptions: { fiber: false, }

    This was there to remove an old bug that is not longer there. I just deleted it and then it was good.