You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Developers on Windows can have issues using mkcert and it failing to add the root certificate to the store due to changes in Windows itself - FiloSottile/mkcert#453
The alternative right now is to make your own patched binary and patch that into Next, maybe Vercel could do this in a similar fashion that I implemented mine?
I built the patched binary and uploaded it with the same version number that Next 14 used.
I also noticed that execSync for mkcert liked to swallow errors so I removed the stdio
Proposal
in dist/esm/lib/mkcert.js:
const downloadUrl = `https://github.com/FiloSottile/mkcert/releases/download/${MKCERT_VERSION}/${binaryName}`;
+ // mkcert is unmaintained... so i forked and applied the patch to hopefully fix windows
+ const downloadUrlWindows = `https://github.com/zGrav/mkcert/releases/download/${MKCERT_VERSION}/${binaryName}`;
+ // use windows fork url if windows
+ const response = await fetch(process.platform === "win32" ? downloadUrlWindows : downloadUrl);
+ // Removed stdio ignore so it prints error output.
+ execSync(`"${binaryPath}" -install -key-file "${keyPath}" -cert-file "${certPath}" ${hosts.join(" ")}`);
in dist/lib/mkcert.js:
+ // mkcert is unmaintained... so i forked and applied the patch to hopefully fix windows
+ const downloadUrlWindows = `https://github.com/zGrav/mkcert/releases/download/${MKCERT_VERSION}/${binaryName}`;
+ // use windows fork url if windows
+ const response = await fetch(process.platform === "win32" ? downloadUrlWindows : downloadUrl);
+ // Removed stdio ignore so it prints error output.
+ (0, _child_process.execSync)(`"${binaryPath}" -install -key-file "${keyPath}" -cert-file "${certPath}" ${hosts.join(" ")}`);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Goals
Non-Goals
No response
Background
Developers on Windows can have issues using mkcert and it failing to add the root certificate to the store due to changes in Windows itself - FiloSottile/mkcert#453
The alternative right now is to make your own patched binary and patch that into Next, maybe Vercel could do this in a similar fashion that I implemented mine?
I built the patched binary and uploaded it with the same version number that Next 14 used.
I also noticed that execSync for mkcert liked to swallow errors so I removed the stdio
Proposal
in
dist/esm/lib/mkcert.js
:in
dist/lib/mkcert.js
:Beta Was this translation helpful? Give feedback.
All reactions