question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular 13.1.1 Compile Failed

See original GitHub issue

Hi @taye ,

I met an issue, would you please help to check? Thanks in advance!

Integrate InteractJS into a new Angular project by following commands, and then compile failed.

npm i interactjs
import interact from 'interactjs'; // in app.component.ts
ng serve -o

Version

Angular: 13.1.1 InteractJS: 1.10.11 OSX: 10.15.7

Error

✔ Browser application bundle generation complete.

Initial Chunk Files   | Names         |  Raw Size
vendor.js             | vendor        |   2.00 MB |
polyfills.js          | polyfills     | 339.20 kB |
styles.css, styles.js | styles        | 212.52 kB |
main.js               | main          |  62.39 kB |
runtime.js            | runtime       |   6.87 kB |

                      | Initial Total |   2.61 MB

Build at: 2021-12-28T04:13:39.925Z - Hash: 9b59fc74801a0d28 - Time: 8507ms

Error: node_modules/@interactjs/types/index.d.ts:267:18 - error TS2428: All declarations of 'BaseEvent' must have identical type parameters.

267     export class BaseEvent<T extends ActionName | null = never> {
                     ~~~~~~~~~


Error: node_modules/@interactjs/types/index.d.ts:287:22 - error TS2428: All declarations of 'BaseEvent' must have identical type parameters.

287     export interface BaseEvent<T extends ActionName> {
                         ~~~~~~~~~


Error: node_modules/@interactjs/types/index.d.ts:2487:34 - error TS2344: Type 'T' does not satisfy the constraint 'keyof ActionMap'.
  Type 'keyof ActionMap | null' is not assignable to type 'keyof ActionMap'.
    Type 'null' is not assignable to type 'keyof ActionMap'.
      Type 'T' is not assignable to type '"resize"'.
        Type 'keyof ActionMap | null' is not assignable to type '"resize"'.
          Type 'null' is not assignable to type '"resize"'.

2487         prevEvent: InteractEvent<T, EventPhase>;
                                      ~


Error: node_modules/@interactjs/types/index.d.ts:2588:135 - error TS2344: Type 'T' does not satisfy the constraint 'keyof ActionMap'.

2588         _createPreparedEvent<P extends EventPhase>(event: PointerEventType, phase: P, preEnd?: boolean, type?: string): InteractEvent<T, P>;
                                                                                                                                           ~


Error: node_modules/@interactjs/types/index.d.ts:2589:64 - error TS2344: Type 'T' does not satisfy the constraint 'keyof ActionMap'.

2589         _fireEvent<P extends EventPhase>(iEvent: InteractEvent<T, P>): void;
                                                                    ~


Error: node_modules/@interactjs/types/index.d.ts:2590:67 - error TS2344: Type 'T' does not satisfy the constraint 'keyof ActionMap'.

2590         _doPhase<P extends EventPhase>(signalArg: Omit<DoPhaseArg<T, P>, 'iEvent'> & {
                                                                       ~


Error: node_modules/@interactjs/types/index.d.ts:2591:36 - error TS2344: Type 'T' does not satisfy the constraint 'keyof ActionMap'.

2591             iEvent?: InteractEvent<T, P>;
                                        ~




** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


✖ Failed to compile.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
thegnuucommented, Jan 24, 2022

Had the same issue, you can add "skipLibCheck": true to skip checks of invalid d.ts files in your node_modules and project files. Since libraries are often written in js and d.ts files are somehow generated, this option might make sense for you guys…

You can find a more detailed post about skipLibCheck here: https://www.testim.io/blog/typescript-skiplibcheck/

0reactions
stale[bot]commented, Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when creating a new project using Angular CLI 13.1.0
So I solved it like this: I created the project using ng new . It then created the project but threw an error...
Read more >
ng update - Angular
Perform a basic update to the current stable release of the core framework and CLI by running the following command. ... To update...
Read more >
@angular/compiler-cli - npm
Angular - the compiler CLI for Node.js. Latest version: 15.0.4, last published: 11 days ago. Start using @angular/compiler-cli in your ...
Read more >
New Section - Angular Components and Core Directives
npm WARN EBADENGINE package: '@angular/compiler-cli@12.0.0', ... Error: ./src/polyfills.ts. Module build failed (from .
Read more >
How To Update Angular CLI To Latest Version
If you get any error try manual installation. npm i rxjs-compat npm i @angular-devkit/build-angular. And Angular CLI 6 no longer uses intl ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found