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

remove process.env.NODE_ENV warning #211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dario-piotrowicz
Copy link
Contributor

A quick (hopefully temporary) solution for the process.env.NODE_ENV warning:
Screenshot 2024-12-27 at 18 20 06

Copy link

changeset-bot bot commented Dec 27, 2024

🦋 Changeset detected

Latest commit: b5b7994

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Dec 27, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/cloudflare@211

commit: b5b7994

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the right (safe) thing to do but because this is Open Next code, it would be easier to modify the code at https://github.com/opennextjs/opennextjs-aws/blob/9595714ac23e5f131b879d04d5cfb2a5d11bdbdd/packages/open-next/src/adapters/util.ts#L4

@dario-piotrowicz
Copy link
Contributor Author

It looks like the right (safe) thing to do but because this is Open Next code, it would be easier to modify the code at https://github.com/opennextjs/opennextjs-aws/blob/9595714ac23e5f131b879d04d5cfb2a5d11bdbdd/packages/open-next/src/adapters/util.ts#L4

yes I agree, but I am not sure how to discern there if the code is being used by Cloudflare and also I wouldn't want to overcomplicate things there only for our use case, I think that it's probably something worth tackling/looking into when we move to a shared monorepo setup, right now I would just add this quick patch to remove the warning not to annoy/scare users away

but I agree that ideally it should be solved in a better way, I just don't think that it's a high enough priority right for us to tackle in such a way right now

if you disagree with the patch I am totally fine not including it 👍

@vicb
Copy link
Contributor

vicb commented Dec 28, 2024

Yes the line I pointed to is the one causing the warning.

It is better to make the function 2 lines there to avoid adding a patch that we would migrate to AST later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants