Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Prettier-atom failed: Couldn't resolve parser 'postcss' #718

Closed
robbymarston opened this issue Mar 31, 2020 · 5 comments
Closed

Prettier-atom failed: Couldn't resolve parser 'postcss' #718

robbymarston opened this issue Mar 31, 2020 · 5 comments

Comments

@robbymarston
Copy link

robbymarston commented Mar 31, 2020

Prettier is using the bundled version (1.18.2) instead of the version from /node_modules. I have confirmed prettier is present in the node_modules directory and in both package.json and package-lock.json (see screenshots). This is causing parser resolution errors such as this one downstream.

Screen Shot 2020-03-31 at 4 36 10 PM
Screen Shot 2020-03-31 at 4 35 34 PM

Atom version: 1.45.0
prettier-atom version: 0.58.2
prettier: bundled
prettier version: 1.18.2
prettier-eslint version: 9.0.1
prettier-atom configuration: {
  "formatOnSaveOptions": {
    "enabled": true,
    "isDisabledIfNotInPackageJson": true,
    "isDisabledIfNoConfigFile": true,
    "respectEslintignore": true,
    "showInStatusBar": false,
    "excludedGlobs": [],
    "whitelistedGlobs": [],
    "ignoreNodeModules": true
  },
  "useEslint": true,
  "useStylelint": true,
  "useEditorConfig": true,
  "prettierEslintOptions": {
    "prettierLast": false
  }
}
@robwise
Copy link
Collaborator

robwise commented Apr 14, 2020

Are you using the prettier-eslint integration? If so, prettier-eslint is the one that's doing the prettier resolution and the bug lies there.

@robbymarston
Copy link
Author

@robwise I am indeed. I'm using prettier-stylelint as well.

@iamkeir
Copy link

iamkeir commented Aug 5, 2020

I am experiencing this issue too. I have prettier-atom version 0.60.1 installed for Atom. It also prompted me to install linter, which is at version 2.3.1.

We also have prettier in our package.json:

"prettier": "2.0.5",
"prettier-package-json": "2.1.3",
"prettier-stylelint": "0.4.2",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-prettier": "3.1.4",

I am a bit out of my depth here so I am not sure how to resolve - any guidance greatly appreciated.

@robwise
Copy link
Collaborator

robwise commented Jan 22, 2021

Doing some issues clean-up. If this is still an issue, please re-open.

@robwise robwise closed this as completed Jan 22, 2021
@sygnas
Copy link

sygnas commented Feb 6, 2022

Thanks for the useful plugin.
I have the same problem.

It happened after I updated the prettier of my project from 1.19.1 to 2.5.1.

ATOM 1.58.0 x64
prettier-atom@0.60.1

Please let me know if there is a way to deal with this.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants