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

🐛 Feature request: (intermediate value).require is not a function / import.meta is not supported #2963

Open
schettn opened this issue Nov 23, 2023 · 1 comment
Labels
bug Something isn't working feature request Request for Workers team to add a feature

Comments

@schettn
Copy link

schettn commented Nov 23, 2023

Which Cloudflare product(s) does this pertain to?

Workers Runtime

What version(s) of the tool(s) are you using?

3.17.1

What version of Node are you using?

No response

What operating system are you using?

Mac

Describe the Bug

[ERROR] service core:user:my-app: Uncaught TypeError: (intermediate value).require is not a function

at index.js:43523:22 in __require2

The problem is that my code / the generated bundle uses:

var __require = id => {
  return import.meta.require(id)
}

And workerd provides an empty object for import.meta, thus import.meta.require is undefined and not a function.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@schettn schettn added the bug Something isn't working label Nov 23, 2023
@penalosa penalosa transferred this issue from cloudflare/workers-sdk Oct 21, 2024
@jasnell jasnell added bug Something isn't working feature request Request for Workers team to add a feature and removed bug Something isn't working labels Oct 22, 2024
@jasnell
Copy link
Member

jasnell commented Oct 22, 2024

Relabeling this as a feature request. We do not currently implement anything on import.meta.

@jasnell jasnell changed the title 🐛 BUG: (intermediate value).require is not a function / import.meta is not supported 🐛 Feature request: (intermediate value).require is not a function / import.meta is not supported Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature request Request for Workers team to add a feature
Projects
Status: Other
Development

No branches or pull requests

2 participants