Problem
Running npm run prettier locally reports success and doesn't make or report any changes, but CI fails with "Prettier diff detected" on the same file. The local and CI prettier behavior is inconsistent.
This could be caused by different prettier/node versions, different config being picked up, or something in scripts/runPrettier.sh behaving differently between environments.
Example workflow failure: https://github.com/Expensify/App/actions/runs/22363352177/job/64722629957
Solution
Investigate why prettier behaves differently locally vs CI. Ensure npm run prettier produces the same results in both environments.
Workaround: Run npx prettier --write <file> directly on the affected file instead of using npm run prettier.
cc @Expensify/mobile-deployers
Problem
Running
npm run prettierlocally reports success and doesn't make or report any changes, but CI fails with "Prettier diff detected" on the same file. The local and CI prettier behavior is inconsistent.This could be caused by different prettier/node versions, different config being picked up, or something in
scripts/runPrettier.shbehaving differently between environments.Example workflow failure: https://github.com/Expensify/App/actions/runs/22363352177/job/64722629957
Solution
Investigate why prettier behaves differently locally vs CI. Ensure
npm run prettierproduces the same results in both environments.Workaround: Run
npx prettier --write <file>directly on the affected file instead of usingnpm run prettier.cc @Expensify/mobile-deployers