next.js
7ce663ed - feat(next-swc): try to fallback native bindings with MODULE_NOT_FOUND (#52667)

Commit
2 years ago
feat(next-swc): try to fallback native bindings with MODULE_NOT_FOUND (#52667) ### What? closes WEB-1287. This PR is a stopgap workaround for https://github.com/npm/cli/issues/4828. There is ongoing discussion & RFC, but it is unclear when we can have those. Until then, PR tries to attempt to load native bindings by manually downloading binaries if original attempt fails with MODULE_NOT_FOUND. The implementation basically reuses most piece of existing wasm fallback; differences are it tries to all possible triples instead, and also try only for MODULE_NOT_FOUND. Other errors are treated as legit error from installed binary, do not attempt to re-download.
Author
Parents
Loading