surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.11k stars 801 forks source link

Cannot find module knockout #3461

Closed MrKrabat closed 2 years ago

MrKrabat commented 2 years ago

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

Compiler is crashing with survey-angular 1.8.71. The older version 1.8.68 was working fine.

Error: node_modules/survey-angular/survey.angular.d.ts:9:21 - error TS2307: Cannot find module 'knockout' or its corresponding type declarations.

9 import * as ko from "knockout";

What is the expected behavior?

Compiler should not crash

How would you reproduce the current behavior (if this is a bug)?

Use survey-angular and compile your project.

Specify your

novikov82 commented 2 years ago

Yes, you right, there is a problem in survey.angular.d.ts. We fix this issue in the nearest release.

jdearing-neudesic commented 2 years ago

This fix still breaks for npm run build --prod as noted in #3479

Error: node_modules/survey-angular/survey.angular.d.ts:8:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

8 const innerKo: any;
  ~~~~~