Interact.js: Cannot find module

Created on 6 May 2020  路  9Comments  路  Source: taye/interact.js

Expected behavior

No ts errors.

Actual behavior

After an upgrade from 1.5.3 to 1.9.13, I get the following error:

$ tsc --noEmit
node_modules/interactjs/index.d.ts:2:22 - error TS2307: Cannot find module '@interactjs/interactjs/index'.

2 import interact from '@interactjs/interactjs/index';
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error.

error Command failed with exit code 1.

System configuration

interact.js version: 1.9.13
Typescript version: 3.8.3
Operating System: Ubuntu 20.04

All 9 comments

Why is this closed? I'm still having this exact issue

Why is this closed?

Because it was fixed in the repo, but not yet published to npm.

@taye I saw that you created v1.9.14, but npm still serves v1.9.13. Can you publish the latest release?

@sualko correct. @doronsever sorry, I'm running into some repo management issues. I hope to get it published within the next 8 hours or so 馃.

done

Hi
I've upgraded to 1.9.14 and now I'm getting:

ERROR in node_modules/@interactjs/interactjs/node_modules/@interactjs/utils/domUtils.d.ts:2:74 - error TS2307: Cannot find module '../types'.

2 export declare function closest(element: Node, selector: string): import("../types").Element;
~~
node_modules/@interactjs/interactjs/node_modules/@interactjs/utils/domUtils.d.ts:7:77 - error TS2307: Cannot find module '../types'.

7 export declare function getActualElement(element: Interact.Element): import("../types").Element;

fixed in v1.9.17

Again:

ERROR in node_modules/@interactjs/types/index.d.ts:45:71 - error TS2694: Namespace 'unknown' has no exported member 'Element'.

45 element: (thing: any) => thing is import("@interactjs/types").Element;
~~~

node_modules/@interactjs/types/index.d.ts:126:91 - error TS2694: Namespace 'unknown' has no exported member 'Element'.

126 export function closest(element: Node, selector: string): import("@interactjs/types").Element;
~~~
node_modules/@interactjs/types/index.d.ts:131:119 - error TS2694: Namespace 'unknown' has no exported member 'Element'.

131 export function getActualElement(element: import("@interactjs/types/index").Element): import("@interactjs/types").Element;
~~~
node_modules/@interactjs/types/index.d.ts:156:174 - error TS2694: Namespace 'unknown' has no exported member 'Rect'.

156 export function getStringOptionResult(value: any, target: import("@interactjs/types/index").HasGetRect, element: any): (Node & ParentNode) | import("@interactjs/types").Rect;
~~~~
node_modules/@interactjs/types/index.d.ts:157:232 - error TS2694: Namespace 'unknown' has no exported member 'Rect'.

157 export function resolveRectLike, target?: import("@interactjs/types/index").HasGetRect, element?: Node, functionArgs?: T): import("@interactjs/types").Rect;
~~~~
node_modules/@interactjs/types/index.d.ts:206:166 - error TS2694: Namespace 'unknown' has no exported member 'ActionProps'.

206 export function copyAction(dest: import("@interactjs/types/index").ActionProps, src: import("@interactjs/types/index").ActionProps): import("@interactjs/types").ActionProps;
~~~
node_modules/@interactjs/types/index.d.ts:230:214 - error TS2694: Namespace 'unknown' has no exported member 'Point'.

230 export function getPageXY(pointer: import("@interactjs/types/index").PointerType | import("@interactjs/types/index").InteractEvent, page?: import("@interactjs/types/index").Point): import("@interactjs/types").Point;
~
node_modules/@interactjs/types/index.d.ts:256:78 - error TS2694: Namespace 'unknown' has no exported member 'Element'.

256 export function getEventTargets(event: any): import("@interactjs/types").Element[];

which TS version are you using?

3.9.2. Can you try with "skipLibCheck": true in your tsconfig.json?

3.9.2

same issue.
How do you use TS-3.9.2 ?

ERROR in The Angular Compiler requires TypeScript >=3.6.4 and <3.9.0 but 3.9.2 was found instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gossi picture gossi  路  5Comments

mateop picture mateop  路  7Comments

max-mykhailenko picture max-mykhailenko  路  5Comments

andrewgleave picture andrewgleave  路  6Comments

Aetherpoint picture Aetherpoint  路  4Comments