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

🐛 BUG: wrangler doesn't inject unenv polyfills with nodejs_compat enabled and compat_date>= 2024-09-23 #6821

Closed
IgorMinar opened this issue Sep 25, 2024 · 1 comment · Fixed by #6824
Assignees
Labels
bug Something that isn't working

Comments

@IgorMinar
Copy link
Contributor

IgorMinar commented Sep 25, 2024

Which Cloudflare product(s) does this pertain to?

Wrangler

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

3.78.8

What version of Node are you using?

22

What operating system and version are you using?

Mac

Describe the Bug

Observed behavior

No hybrid nodejs_compat layer unless I explicitly turn on nodejs_compat_v2 which should be unnecessary with compat date >= 2024-09-23.

Expected behavior

nodejs_compat + >=2024-09-23 ==> new goodness :)

Steps to reproduce

wrangler.toml:

name = "quiet-bird-e12a"
main = "src/index.ts"
compatibility_date = "2024-09-23"
compatibility_flags = ["nodejs_compat"]

src/index.ts:

import fs from 'fs';

export default {
	async fetch(request, env, ctx): Promise<Response> {
		return new Response('Hello World!' + fs);
	},
} satisfies ExportedHandler<Env>;

Workaround

use nodejs_compat_v2 runtime flag instead of nodejs_compat.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@IgorMinar IgorMinar added the bug Something that isn't working label Sep 25, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Sep 25, 2024
@IgorMinar
Copy link
Contributor Author

@petebacondarwin could you please take a look? thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants