We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SassError: Can't find stylesheet to import.

I added sass files like describte in documentation. The apps starts with "npm start" and all works good. Styles are applied. But wenn I run the unit tests with "npm test" the following error occurs:

---------------------------------------------------------------------------------------------------------

./projects/pos-manager/src/app/shared-syncfusion/syncfusion-styles/syncfusion-styles.component.scss?ngResource - Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

SassError: Can't find stylesheet to import.

  ╷

1 │ @import 'ej2-icons/styles/tailwind.scss';

  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  ╵

  node_modules\@syncfusion\ej2-base\styles\tailwind.scss 1:9 @import

  projects\pos-manager\src\app\shared-syncfusion\syncfusion-styles\syncfusion-styles.component.scss 1:9 root stylesheet

---------------------------------------------------------------------------------------------------------




4 Replies

RF René Fabel May 1, 2022 09:03 PM UTC

Here is a sample project. You can run "npm start" and all works, but when you run "npm test" the error occures.


Attachment: syncfusionbuttons_78258692.zip


GV Gokulraj Varatharajan Syncfusion Team May 3, 2022 10:36 AM UTC

Hi René Fabel,


Greetings from Syncfusion support,


Currently, we are validating your query and we will update further details within two business days on or before 5th May 2022.


We appreciate your patience until then.


Regards,

Gokul



GV Gokulraj Varatharajan Syncfusion Team May 6, 2022 02:59 PM UTC

Hi Team,


Thanks for your patience,


We have validated your query and please add the below configuration setup in your angular.json file to resolve your reported issue at our end.


angular.json


"stylePreprocessorOptions": {

              "includePaths": ["node_modules/@syncfusion"]

 },


For your convenience, we have created a sample with this configuration which is working fine and can be downloaded and used from the following sample link.


Sample


Regards,

Gokul



GV Gokulraj Varatharajan Syncfusion Team May 6, 2022 03:05 PM UTC

Hi Team,


Thanks for your patience,


We have validated your query and please add the below configuration setup in your angular.json file to resolve your reported issue at our end. It must be included in angular.json file in the “test” inside the options object.



angular.json


"stylePreprocessorOptions": {

              "includePaths": ["node_modules/@syncfusion"]

 },


For your convenience, we have created a sample with this configuration which is working fine and can be downloaded and used from the following sample link.


Sample


Regards,

Gokul


Loader.
Live Chat Icon For mobile
Up arrow icon