denoland/celldPublic

self-hosted, distributed Durable Objects

Dynamic Worker fails to resolve relative imports between modules in a subdirectory

MA

## Dynamic Worker fails to resolve relative imports between modules in a subdirectory

### Reproduction

The following code works on Cloudflare but fails on celld:

```js const dyn = env.LOADER.load({ compatibilityDate: '2026-01-01', mainModule: 'dir/a.js', modules: { 'dir/a.js': ` import { x } from './b.js' export default { fetch() { return new Response(String(x)) } } `, 'dir/b.js': `export const x = 55`, }, })

return dyn.getEntrypoint().fetch(new Request('http://example.com')) ```

### Expected behavior

HTTP 200 with response body `55`, as observed on Cloudflare.

### Actual behavior

The request fails with:

``` Worker failed: rejected: Error: instantiate: <none> ```

The celld logs contain:

``` WARN celld::js::modules: resolve: no stub for specifier spec=./b.js ```

### Additional context

The issue appears to be relative module resolution: `./b.js` should resolve relative to the importing module (`dir/a.js`), yielding `dir/b.js`, which is present in the supplied module map.

  1. bartlomiejuassigned bartlomiejulast month on GitHub

  2. bartlomiejuclosedlast month on GitHub

  3. BA

    Thanks for the report. It's not fixed and will be released in the next version.

  4. bartlomiejureferenced 81d1c52fb5belast month on GitHub

  5. bartlomiejureferenced 0aa22f091625last month on GitHub

  6. bartlomiejureferenced 46692d514ac3last month on GitHub

  7. ryreferenced def3ad02192dlast month on GitHub

  8. bartlomiejureferenced bab562b22376last month on GitHub

  9. bartlomiejureferenced af69bb4337c5last month on GitHub

  10. bartlomiejureferenced bad4649d01f0last month on GitHub

  11. MA
    Author

    hey @bartlomieju 👋 thanks for the fix! is it possible to see the individual commit? curious to learn about the celld architecture thru the bug fix. cheers!

  12. bartlomiejumentionedlast month on GitHub

  13. bartlomiejusubscribedlast month on GitHub

  14. BA

    @mattfysh nope, we only do release commits in this repo that include all the changes between versions.

  15. mattfyshmentionedlast month on GitHub

  16. mattfyshsubscribedlast month on GitHub

  17. knownasilyareferenced this in fix(execute): resolve Worker Loader imports on celld 0.6 #26last month on GitHub