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.

Cannot find module

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
doronsevercommented, May 17, 2020

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<T extends any[]>(value: import(“@interactjs/types/index”).RectResolvable<T>, 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<any>; ~~~~~~~~~~~ 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?

1reaction
doronsevercommented, May 12, 2020

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;

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I resolve "Cannot find module" error using Node.js?
This happens when a first npm install has crashed for some reason (SIGINT of npm), or that the delay was too long, or...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
When you get the “cannot find module” error, or “module not found”, it means you've not installed the package you're trying to use....
Read more >
How to resolve "Cannot find module" error in Node - Sabe.io
The Cannot find module error is a common error that usually happens when dependencies are not installed. Once you install your dependencies and ......
Read more >
Fixing The "Cannot Find Module" Error In TypeScript
The first thing to fix the "cannot find module" error in TypeScript is to ensure that the package is installed on your system....
Read more >
Error: Cannot find module in JavaScript [SOLVED]
Error: Cannot find module 'package-name' is a popular module error message that you might face when working with Node and its packages which...
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