Skip to content

Commit

Permalink
fix(core): improve error message when native binaries are not found f…
Browse files Browse the repository at this point in the history
…or a supported platform
  • Loading branch information
Cammisuli committed Jun 27, 2023
1 parent 836cd34 commit 42640c5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/nx/bin/nx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ function main() {
process.argv[2] !== '--help' &&
!_supportedPlatform()
) {
if (
process.platform == 'win32' ||
process.platform == 'darwin' ||
process.platform == 'linux' ||
process.platform == 'freebsd'
) {
output.error({
title: 'Native binary not found',
bodyLines: [
`The Nx CLI could not find a native binary for your platform (${process.platform}-${process.arch}).`,
'For troubleshooting steps, please see https://nx.dev/recipes/ci/troubleshoot-nx-install-issues#native-modules',
],
});
process.exit(1);
}

output.error({
title: 'Platform not supported',
bodyLines: [
Expand Down

0 comments on commit 42640c5

Please sign in to comment.