-
Notifications
You must be signed in to change notification settings - Fork 352
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
Improve how the project root is resolved #953
Conversation
01ac9dd
to
5d28949
Compare
I have updated this PR based on #859 (comment). |
There seem to be still be some issues, debugging right now. |
92f4157
to
e427be3
Compare
e427be3
to
ceee950
Compare
Problems fixed! Ready for testing. |
Tested and the fix works. |
Does this change result in breaking existing configuration? My configuration, which was:
Broke post netlify cli upgrade, (went from 2.51.0 to 2.58.0). The behavior I see is that the CLI is no longer is checking for Not sure if this was the change that broke it, but looking at the changes it looked like the most likely culprit. |
Hi @JamesMcMahon, Could you please print (except for confidential values):
Thanks! |
@JamesMcMahon, I ran into the same issue. I solved it by creating an empty My files:
My
My subdirectory package.json:
Perhaps it helps someone 😊 |
This is a workaround to netlify-cli's new way to resolve the project directory. By creating an empty .git folder in the build directory, netlify-cli deploys files relative to that directory (rather than project root). See: netlify/cli#953 (comment)
Just to clarify, I had no problems fixing the issue. I was reporting it hear because it was a breaking change that got bundled into a seem-lying innocuous minor release. In my case, I fixed it by changing [build]
publish = "build" To: [build]
publish = "frontend/build" This is maybe the wrong place to report this, also maybe kind of pointless given that release has already happened. I wanted to record the change for posterity sake. @ehmicky If you still need any of that information let me know. |
@JamesMcMahon If you could post any of the information listed above, this could fix this problem for other users without them having to modify their |
As described in #859, this improves how the project root is resolved, by moving the
findRoot
logic to@netlify/config
instead.Note: this PR is a WIP since it requires netlify/build#1579 and netlify/build#1580 to be merged first. This is why the tests are currently failing.