npm ci | tail reports exit 0 but the build still fails on install
npmConfirmed fix
There is no error message for this one, only the symptom in the title.
Cause
$? after a pipeline is the exit code of the last command (tail), not npm ci. tail almost always exits 0, so a failed install looks like a pass.
Fix
Never trust $? after a pipe. Redirect instead and check the real code:
shell
npm ci --include=dev > /tmp/npmci.log 2>&1; echo "exit: $?"Or use set -o pipefail in the script.
More npm errors
- EAS build fails at Install dependencies: Missing package from lock filenpm error `npm ci` can only install packages when your package.json and package-lock.json are in sync. Missing: @shopify/flash-list@2.3.2 from lock file
- EAS Install dependencies fails after adding a video SDK: deduped package below its peer range
npx -y typescript@x tsc --noEmitprints no TS errors but did not typecheck at allcould not determine executable to run