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

Import of headless.conf.js breaks in Windows due to incorrect pathname #866

Open
1 task done
uglyrobot opened this issue Sep 27, 2024 · 1 comment
Open
1 task done

Comments

@uglyrobot
Copy link

Describe the bug

Using NextJS 14.2 in Windows dev environment. Throws errors that it can't import the config file, and the pathname in the errors is missing the slashes: c:somethingSomethingDirheadless.config.js

I confirmed that merging the configs with withHeadlessConfig() the output is ok, so loading the config in next.config.js is working fine, it's the loading in the package that breaks.

Steps to Reproduce

  • Run npm run dev in Windows
  • Get compile errors

Screenshots, screen recording, code snippet

No response

Environment information

NextJS 14.2.13
Windows
Nodejs 20

WordPress information

No response

Code of Conduct

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

Thanks for the report.

While I'd typically recommend using WSL2, this should be an easy fix, we just need to make path resolution in withHeadstartWPConfig cross-platform and alongside that include windows to run our test builds in CI.

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

2 participants