0

There is a project on nuxt.js. It used SurveyJS. Import according to documentation:

import {SurveyCreator} from "survey-creator-knockout";
import {ICreatorOptions, localization} from "survey-creator-core";
import "survey-creator-core/survey-creator-core.min.css";
import "survey-core/defaultV2.css";
import "survey-creator-core/survey-creator-core.i18n";

This working fine until today. I updated survey-vue-ui and survey-creator-knockout from 1.9.79 to 1.9.90. And nuxt build broke after that.

Module build failed (from ./node_modules/postcss-loader/src/index.js):
JisonParserError: Parse error on line 1:
1 * var(--sjs-font-size, calc(2 * var(--base-unit, 8px)))
--------------------------------------------------------^
Expecting end of input, "ADD", "SUB", "MUL", "DIV", got unexpected "RPAREN"

Error line in CSS file:

.sv-action-bar--default-size-mode .sv-action-bar-item {
    height: calc(5 * var(--base-unit, 8px));
    font-size: calc(1 * var(--sjs-font-size, calc(2 * var(--base-unit, 8px)))); /* <-- error */
    line-height: calc(3 * var(--base-unit, 8px));
    margin: 0 calc(1 * var(--base-unit, 8px));
}

I don't see error here. And order of parentheses is ok (RPAREN?). There are a lot of results in Google for unexpected "RPAREN", but they don't help.

I have returned old version, clear node_modules and reinstall all, but the error remains :(

Dev-server of nuxt is working but nuxt build fails.

androkettle
  • 63
  • 1
  • 6

1 Answers1

0

https://github.com/surveyjs/survey-library/issues/6270

Survey.js shifts the blame to postcss and advises disable calculation in CSS. I disabled and it resolves this problem, but I don't know what new problems it will lead to.

androkettle
  • 63
  • 1
  • 6