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

Error on importing scss files.

Hi,

I am evaluating the components now.
I initially imported the css files related to syncfusion grid and it was working, but when I want to import the scss files, the application fails to build and I get an error saying 

"File to import not found or unreadable: ej2-base/styles/bootstrap4-definition.scss."

I have imported the following files: 

@import '~@syncfusion/ej2-base/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-buttons/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-calendars/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-dropdowns/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-inputs/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-navigations/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-popups/styles/bootstrap4.scss';
@import '~@syncfusion/ej2-splitbuttons/styles/bootstrap4.scss';
@import "~@syncfusion/ej2-react-grids/styles/bootstrap4.scss";

Could you please check and point out what I am doing wrong.

3 Replies

MS Manivel Sellamuthu Syncfusion Team August 8, 2019 06:08 AM

Hi Peeyush, 

Thanks  for your interest in Syncfusion products. 

We suspect that scss files are not properly included your project. 
To include scss files in your project you need follow the below steps. Please find the steps: 

  1. import the scss files from the node modules package in your App.scss file (eg: @import '../node_modules/@syncfusion/ej2-react-grids/styles/material.scss')
  2. install the node-sass package using the command “npm install node-sass –save
  3. Include the  command  “npm run build-css” in your package.json file
  4. After including run the command “npm run build-css” .
  5. Now the styles will be extracted in the app.css files and you can include the css files into your project

We have prepared a basic sample for your convenience. Please find the below sample. 


Please get back to us, if you need further assistance. 

Regards, 
Manivel 



PE Peeyush August 12, 2019 06:22 AM

Hi Manivel,

Thank you for getting back to me. I will try that.


PS Pavithra Subramaniyam Syncfusion Team August 13, 2019 12:56 AM

Hi Peeyush, 
 
Thanks for your update. 
 
Please get back to us if you need nay further assistance on this. 
 
Regards, 
Pavithra S. 


Loader.
Live Chat Icon For mobile
Up arrow icon