Skip to content

fix: improves support for __NEXT_PRIVATE_PREBUNDLED_REACT #2236

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

Merged
merged 15 commits into from
Aug 21, 2023

Conversation

nickytonline
Copy link

@nickytonline nickytonline commented Jul 28, 2023

Description

Improves support for setting __NEXT_PRIVATE_PREBUNDLED_REACT. We have an implementation that detects when to set __NEXT_PRIVATE_PREBUNDLED_REACT to experimental but there are edge cases. The fix is a naive approach where __NEXT_PRIVATE_PREBUNDLED_REACT is set to experimental if the request fails, and we reattempt the request.

Documentation

Relates to https://github.com/netlify/pod-ecosystem-frameworks/issues/489

Tests

You can test this change yourself like so:

  1. TODO

Relevant links (GitHub issues, etc.) or a picture of cute animal

@nickytonline nickytonline requested a review from a team as a code owner July 28, 2023 15:24
@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/64e36af8e3673b0008533eb5
😎 Deploy Preview https://deploy-preview-2236--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/64e36af843343c0008ce166b
😎 Deploy Preview https://deploy-preview-2236--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/64e36af8da04220008269176
😎 Deploy Preview https://deploy-preview-2236--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the type: bug code to address defects in shipped code label Jul 28, 2023
@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/64e36af89b6b1b0008319692
😎 Deploy Preview https://deploy-preview-2236--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit 7b7f774
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/64d4fe11238edf0008c9489c
😎 Deploy Preview https://deploy-preview-2236--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/64e36af822d7e000089ff24c
😎 Deploy Preview https://deploy-preview-2236--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/64e36af87896880008fe9884
😎 Deploy Preview https://deploy-preview-2236--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/64e36af83d99f00008050c3b
😎 Deploy Preview https://deploy-preview-2236--next-plugin-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/64e36af8783cee00084e8bef
😎 Deploy Preview https://deploy-preview-2236--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -23,6 +23,10 @@ const getNetlifyNextServer = (NextServer: NextServerType) => {
private netlifyConfig: NetlifyConfig
private netlifyPrerenderManifest: PrerenderManifest

public getAppRouterReactVersion(): string {
Copy link
Author

Choose a reason for hiding this comment

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

Added this public method so we can get the React version to set process.env.__NEXT_PRIVATE_PREBUNDLED_REACT if the request fails with [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './ server.edge' is not defined

taty2010
taty2010 previously approved these changes Jul 28, 2023
@nickytonline
Copy link
Author

Gonna revisit this on Monday. I think I need to rerun the override hooks for this fix.

@nickytonline nickytonline self-assigned this Jul 31, 2023
@nickytonline nickytonline dismissed taty2010’s stale review July 31, 2023 16:16

Changing the approach a bit

@netlify
Copy link

netlify bot commented Aug 14, 2023

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit 7bebd7b
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/64e36af86d02af0008b432ae
😎 Deploy Preview https://deploy-preview-2236--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Aug 14, 2023

Deploy Preview for lukas-next-runtime-demos-default failed.

Name Link
🔨 Latest commit c503663
🔍 Latest deploy log https://app.netlify.com/sites/lukas-next-runtime-demos-default/deploys/64db2bf8d76e00000820eb63

@taty2010 taty2010 self-assigned this Aug 14, 2023
@taty2010 taty2010 requested a review from a team August 15, 2023 17:16
Copy link
Contributor

@orinokai orinokai left a comment

Choose a reason for hiding this comment

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

Nice sleuthing, @taty2010 and thanks for all your work prior @nickytonline! Looks great to me.

@kodiakhq kodiakhq bot merged commit 4261de7 into main Aug 21, 2023
@kodiakhq kodiakhq bot deleted the nickytonline/prebundled-react-env-var-fix branch August 21, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants