Build fails when running in code editor mode

Post Reply
Sharmilla_Muthu
Posts: 3
Joined: 10 Feb 2022, 15:13

18 Feb 2022, 13:59

Hi,

I'm trying to run theme designer in code editor mode. So I ran npm install and changed the REACT_APP_EDITOR variable in .env configuration file to "code". On building the application I'm getting the following error:

Code: Select all

SassError: Invalid CSS after "...  padding: math": expected expression (e.g. 1px, bold), was ".div(nth($inputPadd"
        on line 15 of src/assets/designer/components/input/_autocomplete.scss
        from line 6 of src/assets/designer/_components.scss
        from line 3 of D:\working_dir\theme_designer_analysis\primereact-designer-7.0.0\src\assets\themes\mytheme\theme.scss
>>         padding: math.div(nth($inputPadding, 1), 2) nth($inputPadding, 2);

   ---------------------^
Could you please help me to resolve this issue?

Node version: 12.22.10

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 Mar 2022, 13:25

Hi,

Did you make any change to $inputPadding variable? If not, I couldn't replicate this issue.

Sharmilla_Muthu
Posts: 3
Joined: 10 Feb 2022, 15:13

14 Mar 2022, 14:10

Hi,

I have done the following change after npm install.
  • changed REACT_APP_EDITOR variable in .env configuration file to "code"
Then I ran "npm run build". On building the application I'm getting the error mentioned in above post.

I haven't made any changes in ts files. My node version is v12.22.10 and theme designer version is 7.0.0. Could you please share me your node version?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

21 Mar 2022, 10:45

Hi,

Unfortunately, I still couldn't replicate this error. My node version is v16.13.1. I think this issue is related to sass version. Also, could you please check "sass" package in package.json? And could you please try the Designer 7.1.0 version?

Best Regards,

Sharmilla_Muthu
Posts: 3
Joined: 10 Feb 2022, 15:13

22 Mar 2022, 20:34

Hi,

The node-sass version mentioned in the package.json of theme designer v7.0.0 is "^4.12.0" and it installs the node-sass version "4.14.1" (from package-lock).
From the node-sass readme: https://github.com/sass/node-sass , Node v16 supports 6.0+ version of node-sass and Node versions - v12, v13, v14 supports "4.14.0" version of node-sass. Could you please confirm what node-sass version you are using if the Node version is v16.13.1?

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

08 Apr 2022, 11:10

Hi,

Please remove node-sass. It is deprecated. You can add "sass": "1.43.4" instead or could you please try the latest designer version(7.1.1)?
Details; https://www.npmjs.com/package/node-sass

Best Regards,

Post Reply

Return to “PrimeReact Theme Designer API”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests