question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible with the new ES6 module worker format

See original GitHub issue

It seems that this package still has the assumption of the old worker format (e.g. global environment variables, FetchEvent, etc) and does not work properly with the new ES6 module format. I would like to use Durable Objects, which requires the new ES6 module format, in a Workers Site project, and wrangler already has a patchset for Workers Site support with the new ES6 module format, and the fact that this package does not support the new format seems to be the last blocker.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:14
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
threepointonecommented, Nov 9, 2021

We’re cutting a release on both wrangler and kv-asset-handler that should provide a path forward. I’ll send a PR documenting how very soon.

0reactions
threepointonecommented, Nov 16, 2021

released, with the readme updated, we’ll update the official docs as well soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error [ERR_REQUIRE_ESM]: require() of ES Module not ...
However I keep getting this message: [ERR_REQUIRE_ESM]: require() of ES Module from not supported. Instead change the require of index.js in...
Read more >
ES modules in service workers - web.dev
Chrome and Edge have supported ES modules in shared workers since version 83, but no other browser offers support at this time.
Read more >
ES6 In Depth: Modules - the Web developer blog
An ES6 module is a file containing JS code. There's no special module keyword; a module mostly reads just like a script.
Read more >
Avoid these issues when using new ECMAScript modules in ...
Importing commonjs modules into ECMAScript es6 modules​​ You have to import them using import syntax. Both typescript and Node.
Read more >
16. Modules - Exploring JS
ES6 modules are stored in files. ... The two most important (and unfortunately incompatible) standards are: CommonJS Modules: The dominant implementation of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found