Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surface not found modules as diagnostics instead of erroring and failing to load #27188

Closed
dsherret opened this issue Dec 2, 2024 · 4 comments · Fixed by #27533, #28174 or #28337
Closed
Labels
bug Something isn't working correctly tsc related to the TypeScript tsc compiler

Comments

@dsherret
Copy link
Member

dsherret commented Dec 2, 2024

In this example: #27186

tsc:

node_modules/.deno/@mapbox+search-js-web@1.0.0-beta.24/node_modules/@mapbox/search-js-web/dist/index.d.ts:1:22 - error TS6053: File 'V:/scratch/node_modules/.deno/@mapbox+search-js-web@1.0.0-beta.24/node_modules/@mapbox/search-js-web/src/types/custom_elements.d.ts' not found.

1 /// <reference path="../src/types/custom_elements.d.ts" />
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/.deno/@mapbox+search-js-web@1.0.0-beta.24/node_modules/@mapbox/search-js-web/dist/index.d.ts:2:22 - error TS6053: File 'V:/scratch/node_modules/.deno/@mapbox+search-js-web@1.0.0-beta.24/node_modules/@mapbox/search-js-web/src/types/typehead.d.ts' not found.

2 /// <reference path="../src/types/typehead.d.ts" />
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~

Us:

> deno check asdf.ts
Check file:///V:/scratch/asdf.ts
error: Uncaught Error: Unable to load V:\scratch\node_modules\.deno\@mapbox+search-js-web@1.0.0-beta.24\node_modules\@mapbox\search-js-web\src\types\custom_elements.d.ts: The system cannot find the path specified. (os error 3)
    at Object.getSourceFile (ext:deno_tsc/99_main_compiler.js:621:28)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126789:23)
    at findSourceFile (ext:deno_tsc/00_typescript.js:126705:20)
    at ext:deno_tsc/00_typescript.js:126654:22
    at getSourceFileFromReferenceWorker (ext:deno_tsc/00_typescript.js:126625:26)
    at processSourceFile (ext:deno_tsc/00_typescript.js:126652:5)
    at ext:deno_tsc/00_typescript.js:126946:7
    at forEach (ext:deno_tsc/00_typescript.js:2284:22)
    at processReferencedFiles (ext:deno_tsc/00_typescript.js:126945:5)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126848:9)
@dsherret dsherret added bug Something isn't working correctly tsc related to the TypeScript tsc compiler labels Dec 2, 2024
@invalidred
Copy link

invalidred commented Feb 6, 2025

This issue still happens after I updated to deno 2.1.9

error: Error: Unable to load /Users/abdulkhan/github/asi/main/app/node_modules/.deno/@mapbox+search-js-web@1.0.0-beta.25/node_modules/@mapbox/search-js-web/src/types/custom_elements.d.ts: No such file or directory (os error 2)
    at Object.getSourceFile (ext:deno_tsc/97_ts_host.js:461:26)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126789:23)
    at findSourceFile (ext:deno_tsc/00_typescript.js:126705:20)
    at ext:deno_tsc/00_typescript.js:126654:22
    at getSourceFileFromReferenceWorker (ext:deno_tsc/00_typescript.js:126625:26)
    at processSourceFile (ext:deno_tsc/00_typescript.js:126652:5)
    at ext:deno_tsc/00_typescript.js:126946:7
    at forEach (ext:deno_tsc/00_typescript.js:2284:22)
    at processReferencedFiles (ext:deno_tsc/00_typescript.js:126945:5)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:126848:9)

@dsherret
Copy link
Member Author

dsherret commented Feb 7, 2025

Waiting on #27548

@invalidred
Copy link

Gotcha tysm @dsherret !

@dsherret
Copy link
Member Author

Reopening. Not fixed for the original scenario: #28174 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly tsc related to the TypeScript tsc compiler
Projects
None yet
2 participants