-
Notifications
You must be signed in to change notification settings - Fork 13.4k
TS-Check: cannot find module #28233
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDomain: LS: TSServerIssues related to the TSServerIssues related to the TSServer
Milestone
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDomain: LS: TSServerIssues related to the TSServerIssues related to the TSServer
TypeScript Version: 3.1.3
Code
Expected behavior:
Axios will be required from './node_modules/axios/index'
Actual behavior:
Error shown is
cannot find module 'axios'despite axios being installed. Note that this problem is not axios specific, it occurs with any module. However, if I use the following syntax then it is required correctly.Screenshots:
The error:
No error when using path:
TypeScript debug error: