Skip to content

npm run prettier behaves inconsistently between local and CI #83352

@marcaaron

Description

@marcaaron

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorMelvin TriageAutomatic AI Analysis of an issueReviewingHas a PR in review

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions