-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby-adapter-netlify): support monorepos #39005
Merged
pieh
merged 6 commits into
master
from
michalpiechowiak/fra-552-ssr-error-enoent-no-such-file-or-directory-lstat
Jul 11, 2024
Merged
fix(gatsby-adapter-netlify): support monorepos #39005
pieh
merged 6 commits into
master
from
michalpiechowiak/fra-552-ssr-error-enoent-no-such-file-or-directory-lstat
Jul 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gatsbot
bot
added
the
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
label
Jun 3, 2024
pieh
added
topic: adapters
Related to Gatsby Adapters
and removed
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
labels
Jun 3, 2024
pieh
force-pushed
the
michalpiechowiak/fra-552-ssr-error-enoent-no-such-file-or-directory-lstat
branch
20 times, most recently
from
June 4, 2024 11:06
8c1ca47
to
520635d
Compare
…onorepo cases will bundle all required files correctly
…ad infer root of 'gatsby' through relative path from entry module and set process.cwd() based on that so rest of utils relying on process.cwd() continue to work in monorepo scenarios
pieh
force-pushed
the
michalpiechowiak/fra-552-ssr-error-enoent-no-such-file-or-directory-lstat
branch
from
June 4, 2024 11:39
520635d
to
aa13fbb
Compare
2 tasks
eduardoboucas
approved these changes
Jul 11, 2024
…no-such-file-or-directory-lstat
serhalp
previously approved these changes
Jul 11, 2024
serhalp
approved these changes
Jul 11, 2024
pieh
deleted the
michalpiechowiak/fra-552-ssr-error-enoent-no-such-file-or-directory-lstat
branch
July 11, 2024 17:10
pieh
added a commit
that referenced
this pull request
Jul 11, 2024
* test: run e2e adapters in monorepo setup * fix(gatsby-adapter-netlify): ensure we set includedFilesBasePath so monorepo cases will bundle all required files correctly * fix(gatsby): don't rely on process.cwd() in lambda for ssr/dsg, instead infer root of 'gatsby' through relative path from entry module and set process.cwd() based on that so rest of utils relying on process.cwd() continue to work in monorepo scenarios * chore: minor cleanup * chore: bump caniuse-lite (cherry picked from commit 1a56c34)
pieh
added a commit
that referenced
this pull request
Jul 12, 2024
* test: run e2e adapters in monorepo setup * fix(gatsby-adapter-netlify): ensure we set includedFilesBasePath so monorepo cases will bundle all required files correctly * fix(gatsby): don't rely on process.cwd() in lambda for ssr/dsg, instead infer root of 'gatsby' through relative path from entry module and set process.cwd() based on that so rest of utils relying on process.cwd() continue to work in monorepo scenarios * chore: minor cleanup * chore: bump caniuse-lite (cherry picked from commit 1a56c34) Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
|
This was referenced Oct 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
DSG/SSR handler was making some assumptions about how it's being mounted in serverless that were not correct when site deployed to Netlify is part of monorepo:
includedFiles
in particular was not working due to base directory assuming root of repo and hence those files were not being bundled (it did bundle some things due to regular import tracking, but not all required things when static analisys would not catch some files) - fixed with a3aa898.cache
directory for monorepo is not in<cwd>/.cache
and instead is in<cwd>/<package_path>/.cache
- instead of using<cwd>
to figure out directory it now goes other way around by resolving directory locations by resolving directories relative to main function entry point module - fixed with 6efd4bbThe changes can be tested using canary releases:
Tests
Added workflow that run adapters e2e tests with fixture using monorepo setup (first commit is just added monorepo test setup showing it failing lots of adapters e2e test and remaining commits fixed the problems making it pass).
Related Issues
Fixes https://linear.app/netlify/issue/FRA-552/ssr-error-enoent-no-such-file-or-directory-lstat-vartaskcachedata-on