diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js index 4fc14c92c17a9..578bcc82287de 100644 --- a/lib/utils/error-message.js +++ b/lib/utils/error-message.js @@ -301,7 +301,7 @@ const errorMessage = (er, npm) => { 'Not compatible with your version of node/npm: ' + er.pkgid, 'Required: ' + JSON.stringify(er.required), 'Actual: ' + - JSON.stringify({ npm: npm.version, node: process.version }), + JSON.stringify({ node: process.version, npm: npm.version }), ].join('\n')]) break diff --git a/tap-snapshots/test/lib/utils/error-message.js.test.cjs b/tap-snapshots/test/lib/utils/error-message.js.test.cjs index 80cfdd880c582..af91a3ce0427c 100644 --- a/tap-snapshots/test/lib/utils/error-message.js.test.cjs +++ b/tap-snapshots/test/lib/utils/error-message.js.test.cjs @@ -222,7 +222,7 @@ Object { String( Not compatible with your version of node/npm: some@package Required: undefined - Actual: {"npm":"123.456.789-npm","node":"123.456.789-node"} + Actual: {"node":"123.456.789-node","npm":"123.456.789-npm"} ), ], ], @@ -1202,7 +1202,7 @@ Object { String( Not compatible with your version of node/npm: some@package Required: undefined - Actual: {"npm":"123.456.789-npm","node":"123.456.789-node"} + Actual: {"node":"123.456.789-node","npm":"123.456.789-npm"} ), ], ],