{"id":606,"hash":"79329e7a4e58b4649978ef5ef7a40bdfb8a73cdcece336b04b5b6b12dd043bae","pattern":"Prettier 3.0.0 TypeError: prettier.resolveConfig.sync is not a function","full_message":"The error triggered after I run this command:\n\nnpx eslint \"the code directory\"\n\nThis is the first several line of the error\n\nTypeError: prettier.resolveConfig.sync is not a function\nOccurred while linting *the first line of the first code directory*  \nRule: \"prettier/prettier\"\n    at Program (*the main directory*\\node_modules\\eslint-plugin-prettier\\eslint-plugin-prettier.js:138:40)\n\nThese are eslint, prettier, and the other config taken from package.json\n\n\"eslint\": \"^8.42.0\",\n\"eslint-config-prettier\": \"^8.8.0\",\n\"eslint-plugin-cypress\": \"^2.13.3\",\n\"eslint-plugin-prettier\": \"^4.2.1\",\n\"prettier\": \"3.0.0\",\n\"prettier-eslint\": \"^15.0.1\"\n\nI've tried delete the files from node_modules and run 'npm i' then restart the IDE (using VS Code), it still happens.","ecosystem":"npm","package_name":"eslint","package_version":null,"solution":"There is an incompatibility between prettier 3 and eslint-plugin-prettier 4.\n\nYou can fix this by using version 5 of eslint-plugin-prettier:\n\nyarn add -D eslint-plugin-prettier@5.0.0\n\nor\n\nnpm install --save-dev eslint-plugin-prettier@5.0.0\n\nOfficial issue: https://github.com/prettier/eslint-plugin-prettier/issues/562\nv5 release notes: https://github.com/prettier/eslint-plugin-prettier/releases/tag/v5.0.0","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/76624993/prettier-3-0-0-typeerror-prettier-resolveconfig-sync-is-not-a-function","votes":182,"created_at":"2026-04-19T04:51:24.116733+00:00","updated_at":"2026-04-19T04:51:25.707280+00:00"}