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
I'm working with a private package registry that supports only HTTPS and requires a CA certificate for authentication. The fetchPkgInfo method in patch-incorrect-lockfile.ts attempts to fetch missing SWC packages but does so without passing the required certificate. This seems to be the root cause of the following error:
Failed to patch lockfile, please try uninstalling and reinstalling next in this workspace
TypeError: fetch failed
...
code: UNABLE_TO_VERIFY_LEAF_SIGNATURE
...
Failed to compile
For now, I’ve worked around this issue by setting the NEXT_IGNORE_INCORRECT_LOCKFILE environment variable. This resolved the problem temporarily, but I still have some open questions:
Why does patchIncorrectLockfile() force me to install all optional SWC dependencies instead of only the ones required by my OS?
Should the build process fail if the script cannot fetch optional packages? For example, if a package is missing from the registry or there’s a communication failure with the registry, does it make sense for the entire build to fail?
Why is the NEXT_IGNORE_INCORRECT_LOCKFILE environment variable undocumented? This feels like a critical piece of information for developers encountering similar issues.
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
-
Summary
I'm working with a private package registry that supports only HTTPS and requires a CA certificate for authentication. The
fetchPkgInfo
method inpatch-incorrect-lockfile.ts
attempts to fetch missing SWC packages but does so without passing the required certificate. This seems to be the root cause of the following error:For now, I’ve worked around this issue by setting the
NEXT_IGNORE_INCORRECT_LOCKFILE
environment variable. This resolved the problem temporarily, but I still have some open questions:patchIncorrectLockfile()
force me to install all optional SWC dependencies instead of only the ones required by my OS?NEXT_IGNORE_INCORRECT_LOCKFILE
environment variable undocumented? This feels like a critical piece of information for developers encountering similar issues.Thanks 🤗
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions