deno icon indicating copy to clipboard operation
deno copied to clipboard

Deno doesnt load file when importing jsr:x module

Open MARCROCK22 opened this issue 1 year ago • 4 comments

deno 2.0.0 (stable, release, aarch64-unknown-linux-gnu) v8 12.9.202.13-rusty typescript 5.6.2

https://github.com/MARCROCK22/deno-bug please see seyfert.config.mjs and src/main.ts files.

For some reason, if a module imports an file that imports a jsr module, it doesnt work I dont get any error, process doesnt even stops (it just stays alive?)

MARCROCK22 avatar Oct 11 '24 00:10 MARCROCK22

When a package.json is present it's expected to run deno install first. Do you still get the error after running deno install?

marvinhagemeister avatar Oct 11 '24 07:10 marvinhagemeister

When a package.json is present it's expected to run deno install first. Do you still get the error after running deno install?

deno install does not solve the issues and as mentioned it works correctly if the import is in the main file, is it a question of dynamic loading?

socram03 avatar Oct 11 '24 14:10 socram03

deno install does not fix the issue. I do not get any error when I run the code. Try the repo I attached above :d

MARCROCK22 avatar Oct 12 '24 03:10 MARCROCK22

Apparently, the "require" in seyfert internal code its causing the issue The eval(import...) works tho (?

MARCROCK22 avatar Oct 31 '24 15:10 MARCROCK22

I can't repeat this with Deno 2.2.2, closing. Please reopen if you still have a problem.

ry avatar Mar 03 '25 19:03 ry

I can't repeat this with Deno 2.2.2, closing. Please reopen if you still have a problem.

Using deno 2.2.8, this issue is still happening btw! Using the same source code https://github.com/MARCROCK22/deno-bug, the promise never resolves.

milosworks avatar Apr 08 '25 16:04 milosworks

I can't repeat this with Deno 2.2.2, closing. Please reopen if you still have a problem.

Yea, this issue is still happening Edit: using 2.2.8

MARCROCK22 avatar Apr 08 '25 23:04 MARCROCK22

The issue here is it's a synchronous require of esm and it looks like the tokio event loop isn't being driven. deno_graph spawns tasks in tokio and those don't seem to be driven.

https://github.com/denoland/deno_core/blob/1b0115c3d1c65a1c004a1f1548f357082f312b67/core/ops_builtin.rs#L597

dsherret avatar Oct 30 '25 19:10 dsherret