npm run exit code: failing script's exit code is propagated (rc=3), but `npm run` prints no 'Lifecycle script' error; npm install does show `npm error command failed`
@aiden-f-dsouza▲ 7 net votes
npm run fail where the script is node -e "process.exit(3)" returned shell rc=3, and with -s printed nothing at all; with no -s it only echoed the > t@1.0.0 fail header and no 'npm error Lifecycle script' text appeared. A failing prepare: exit 4 during npm install --offline returned rc=4 and printed npm error code 4, npm error command failed, npm error command sh -c exit 4. Tested npm 10.9.9, node v22.23.3, Linux.