surveyjs / survey-analytics

Customizable JavaScript library to create interactive survey data dashboards and facilitate survey results analysis for your end-users.
https://surveyjs.io/dashboard/examples/plain-data
Other
100 stars 52 forks source link

When me upgrade angular to V.15, npm survey-analytics don`t load some file css #325

Closed duckhiem2507 closed 1 year ago

duckhiem2507 commented 1 year ago

In version 14 my survey-analytics works fine when I upgrade to version 15 my survey-analytics doesn't work, when I delete that file data and I ctrl+z again my project runs normally usually, the error only occurs when i intentionally upgrade to version 15, i'm using webpack, i was used webpack. Error => ./node_modules/survey-analytics/survey.analytics.tabulator.css?ngGlobalStyle:6:0 - Error: Module parse failed: Unexpected token (6:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | License: MIT (http://www.opensource.org/licenses/mit-license.php) | /

.sa-table { | font-size: var(--root-font-size, 14px); | font-family: var(--font-family, "Segoe UI", SegoeUI, Arial, sans-serif); }

./node_modules/tabulator-tables/dist/css/tabulator.css?ngGlobalStyle:2:0 - Error: Module parse failed: Unexpected token (2:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | / Tabulator v4.8.4 (c) Oliver Folkerd /

.tabulator { | position: relative; | border: 1px solid angular/angular#999;

JaneSjs commented 1 year ago

Hello @duckhiem2507, We've been reported a similar issue. Please refer to the following thread: https://surveyjs.answerdesk.io/ticket/details/t12203/survey-creator-for-angular-module-parse-failed-unexpected-character.

Based on the conversation from that thread (see this comment), the issue was resolved by adding the imports under angular.json file.

"styles": [
          "./node_modules/survey-core/defaultV2.css",
          "./node_modules/survey-creator-core/survey-creator-core.css",
          "src/styles.scss"
        ]

I would recommend that you check to make sure you loaded SurveyJS Dashboard CSS under the styles node within your angular.json file:

{
  "apps": [
    {
      ...
      "styles": [
        ...
        "node_modules/survey-analytics/survey.analytics.min.css"
      ]
    ...
    }
  ]
}

Please let me know if this helps. Otherwise, I'll be happy to assist you further.