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

Uncaught AssertionError: "data" is unexpectedly null for "https://esm.sh/v135/node.ns.d.ts" #28176

Open
flaviavelosoqueiroz opened this issue Feb 18, 2025 · 2 comments
Assignees
Labels
upstream Changes in upstream are required to solve these issues

Comments

@flaviavelosoqueiroz
Copy link

Hi everyone! How are you doing?
My Deno tests are failing with the following error, even though I've configured vendor: true.

error: Uncaught AssertionError: "data" is unexpectedly null for "https://esm.sh/v135/node.ns.d.ts".
    at assert (ext:deno_tsc/99_main_compiler.js:130:13)
    at Object.getSourceFile (ext:deno_tsc/99_main_compiler.js:561:7)
    at findSourceFileWorker (ext:deno_tsc/00_typescript.js:120340:25)
    at findSourceFile (ext:deno_tsc/00_typescript.js:120260:22)
    at ext:deno_tsc/00_typescript.js:120209:24
    at getSourceFileFromReferenceWorker (ext:deno_tsc/00_typescript.js:120178:28)
    at processSourceFile (ext:deno_tsc/00_typescript.js:120207:7)
    at ext:deno_tsc/00_typescript.js:120479:9
    at forEach (ext:deno_tsc/00_typescript.js:55:24)
    at processReferencedFiles (ext:deno_tsc/00_typescript.js:120478:7)

When I use "checkJs": true on compilerOptions I can see:

error: Module not found "https://esm.sh/v135/node.ns.d.ts".
at https://esm.sh/v135/@types/[email protected]/X-ZS9idWZmZXIsY3J5cHRvLGRucyxldmVudHMsZnMsaHR0cCxuZXQscXVlcnlzdHJpbmcscmVhZGxpbmUsc3RyZWFtLHRscyx1cmw/index.d.ts:1:21

Could you please help me? Have any of you had this problem?

Here are my settings:

deno 1.38.4 (release, aarch64-apple-darwin)
v8 12.0.267.1
typescript 5.2.2

Thanks in advance!

@marvinhagemeister
Copy link
Contributor

Looks like a bug in esm.sh . Deno can't do much when they're retuning a 404. I've filed an upstream bug here esm-dev/esm.sh#1081

@marvinhagemeister marvinhagemeister added the upstream Changes in upstream are required to solve these issues label Feb 19, 2025
@dsherret
Copy link
Member

We should be returning a ts diagnostic in this case instead of erroring. I'll take a look at why this is happening.

@dsherret dsherret self-assigned this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Changes in upstream are required to solve these issues
Projects
None yet
Development

No branches or pull requests

3 participants