Skip to content

fix: added polyfill for process.env #1889

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 3 commits into from
Jan 19, 2023
Merged

fix: added polyfill for process.env #1889

merged 3 commits into from
Jan 19, 2023

Conversation

taty2010
Copy link
Contributor

Summary

Using process.env to access env vars within an edge function currently returns an error when running netlify dev. Updated next-dev file within edge to now polyfill process.env and allow it to work within edge functions.

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

Fixes #1864

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality
  • Add docs when necessary

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@taty2010 taty2010 added the type: bug code to address defects in shipped code label Jan 17, 2023
@taty2010 taty2010 requested a review from a team January 17, 2023 19:58
@taty2010 taty2010 self-assigned this Jan 17, 2023
@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/63c976a266fb7300087d62a7
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/63c976a282953d00082cd4d3
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/63c976a251d56e0008f001fd
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/63c976a2b4080f0008b14c9f
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/63c976a200154800083ee777
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/63c976a2512b330009efd72a
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

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

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/63c976a200922b00082c9bf9
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/63c976a26613b9000a0b9abe
😎 Deploy Preview https://deploy-preview-1889--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 settings.

@netlify
Copy link

netlify bot commented Jan 17, 2023

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit 06de843
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/63c976a2ed2f9100089c513a
😎 Deploy Preview https://deploy-preview-1889--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 settings.

Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Thanks @taty2010! 🚢

@kodiakhq kodiakhq bot merged commit 15af7c7 into main Jan 19, 2023
@kodiakhq kodiakhq bot deleted the tn/nextDev-edge-polyfill branch January 19, 2023 17:01
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.

process.env not polyfilled for Edge Functions in CLI
3 participants