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

fix: add fs.promises to linked filesystem #441

Merged
merged 3 commits into from
Jul 15, 2022

Conversation

ericapisani
Copy link
Contributor

@ericapisani ericapisani commented Jul 15, 2022

Summary

When redirecting filesystem paths using the linkfs package, fs.promises is not included in the redirected or proxied paths, resulting in a "Cannot destructure property 'readFile' of 'fs_1.promises' " error on SSR pages.

This change makes promises is available on the global _fsWrapper property that is used by Gatsby. This ensures that underlying Gatsby dependencies (specifically graphql-tools in this case) have this available.

Test plan

Deploy preview - this page should render successfully

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

Fixes https://github.com/netlify/pod-ecosystem-frameworks/issues/139
IMG-20220713-WA0000

@ericapisani ericapisani added the bug Something isn't working label Jul 15, 2022
@ericapisani ericapisani requested a review from a team July 15, 2022 15:29
@ericapisani ericapisani self-assigned this Jul 15, 2022
@netlify
Copy link

netlify bot commented Jul 15, 2022

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

Name Link
🔨 Latest commit 20cd5c7
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-gatsby-demo/deploys/62d187dd62f185000986e934
😎 Deploy Preview https://deploy-preview-441--netlify-plugin-gatsby-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

@sarahetter sarahetter left a comment

Choose a reason for hiding this comment

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

🎉

@kodiakhq kodiakhq bot merged commit d5be3cc into main Jul 15, 2022
@kodiakhq kodiakhq bot deleted the ep/missing-readFile-on-fs-promises branch July 15, 2022 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge bug Something isn't working type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants