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

next start path-to-project breaks config loading. #746

Open
1 task done
nicholasio opened this issue Apr 8, 2024 · 3 comments
Open
1 task done

next start path-to-project breaks config loading. #746

nicholasio opened this issue Apr 8, 2024 · 3 comments

Comments

@nicholasio
Copy link
Member

Describe the bug

Because next start path-to-project apparentlys makes process.cwd() be where the next command was executed from, it breaks config loading.

I'm not sure if we can actually fix this, maybe we just need to document that next path-to-project isn't supported by HeadstartWP

Steps to Reproduce

  1. Do a build
  2. From the root of the monorepo run next start projects/wp-nextjs
  3. See an error about the config.
  4. Now run next start directly in projects/wp-nextjs and there's not issue.

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Tanu1201
Copy link

Hey, can I take this up?

@nicholasio
Copy link
Member Author

@Tanu1201 feel free to pick this up, I'm sure not sure what the workaround would be. withHeadstartWPConfig makes the assumption that it is being called from the next.js root directory to load some files automatically.

@uglyrobot
Copy link

Related #866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants