Question T7280
Visible to All Users

Cannot find module error

created 4 years ago (modified 4 years ago)

[Ticket cloned from T2416: Angular Issue with Custom tab]

Code
import tabsTemplates from "./survey.creator.summary-template.html";

Cannot find module './survey.creator.summary-template.html' or its corresponding type declarations.ts(2307)

View Problem (Alt+F8)
I got the above error at that point when i clone and run it in angular.
Please do help!
Thank you.

Comments (2)

    Hello,

    Can you share a minimal live sample illustrating the issue and/or the exact steps to reproduce it in our demos?

    Thanks, Serge
    SurveyJS Team

      I just clone the project from https://stackblitz.com/edit/github-5xs2qx-jxpcjk-creator-addtab
      and tried to run it locally it directs the error.

      Answers approved by surveyjs Support

      created 4 years ago

      Hello,

      This issue is not related to SurveyJS functionality. You need to configure your project build system so it can import HTML files as raw text.
      Similar issue was discussed here - https://stackoverflow.com/questions/62165638/angular-9-how-to-import-html-file-as-a-string-with-typescript
      Hope it help

      Thanks, Serge
      SurveyJS Team