next-on-pages not working on Windows

I'm on Windows and when I run npm run pages:build I get the following warning:
⚡️ @cloudflare/next-on-pages CLI v.1.13.2

⚡️ Warning: It seems like you're on a Windows system, the Vercel CLI (run by @cloudflare/next-on-pages
⚡️ to build your application) seems not to work reliably on Windows so if you experience issues during
⚡️ the build process please try switching to a different operating system or running
⚡️ @cloudflare/next-on-pages under the Windows Subsystem for Linux
⚡️ @cloudflare/next-on-pages CLI v.1.13.2

⚡️ Warning: It seems like you're on a Windows system, the Vercel CLI (run by @cloudflare/next-on-pages
⚡️ to build your application) seems not to work reliably on Windows so if you experience issues during
⚡️ the build process please try switching to a different operating system or running
⚡️ @cloudflare/next-on-pages under the Windows Subsystem for Linux
The problem is that it immediately opens a WSL instance and it's really unclear what to do. If I close it I get the following:
EXIT WHEN NOT EXPECTED

SHELLAC COMMAND FAILED!
Executing: npm --version in D:\nextjs\ms-bot-dashboard

STDOUT:



STDERR:



⚡️ Unexpected error: {"cmd":"npm --version","stdout":"","stderr":""}
EXIT WHEN NOT EXPECTED

SHELLAC COMMAND FAILED!
Executing: npm --version in D:\nextjs\ms-bot-dashboard

STDOUT:



STDERR:



⚡️ Unexpected error: {"cmd":"npm --version","stdout":"","stderr":""}
If I try to run npm run pages:build directly inside WSL the result is the same. What can I do to test it locally?
2 Replies
Erisa
Erisa4w ago
WSL will often try to be "smart" and run the executables on your windows machine if there is no executable with that name inside the WSL distro, have you checked that node/npm is installed inside the WSL instance and verified with which npm that the right one is being used?
D Trombett
D Trombett4w ago
Sooo, I've reinstalled npm and it worked. I executed npm start and it started correctly but it seems unable to use the network? Every server side request hangs and shows
[TypeError: fetch failed] {
cause: [ConnectTimeoutError: Connect Timeout Error] {
name: 'ConnectTimeoutError',
code: 'UND_ERR_CONNECT_TIMEOUT',
message: 'Connect Timeout Error'
}
}
[TypeError: fetch failed] {
cause: [ConnectTimeoutError: Connect Timeout Error] {
name: 'ConnectTimeoutError',
code: 'UND_ERR_CONNECT_TIMEOUT',
message: 'Connect Timeout Error'
}
}
Want results from more Discord servers?
Add your server