ERROR prettier.resolveConfig.sync is not a function
See original GitHub issueSince the last update 0.39.0
I am getting the following error when trying to format a file:
Prettier debug output:
Atom version: 1.20.0
prettier-atom version: 0.39.0
prettier version: 1.7.0
prettier-eslint version: 8.1.0
prettier-atom configuration: {
"formatOnSaveOptions": {
"enabled": true,
"excludedGlobs": [
"**/*.html"
],
"respectEslintignore": true,
"showInStatusBar": false,
"javascriptScopes": [
"source.js",
"source.jsx",
"source.js.jsx",
"source.babel",
"source.js-semantic",
"text.html.basic",
"text.html.vue"
],
"typescriptScopes": [
"source.ts",
"source.tsx",
"source.ts.tsx"
],
"cssScopes": [
"source.css",
"source.less",
"source.css.less",
"source.scss",
"source.css.scss"
],
"jsonScopes": [
"source.json"
],
"graphQlScopes": [
"source.graphql"
],
"whitelistedGlobs": [],
"isDisabledIfNotInPackageJson": false,
"isDisabledIfNoConfigFile": false
},
"prettierOptions": {
"parser": "flow",
"semi": false,
"singleQuote": false,
"bracketSpacing": true,
"useTabs": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"tabWidth": "auto",
"trailingComma": "none"
},
"useEslint": true,
"useEditorConfig": true,
"prettierEslintOptions": {
"prettierLast": false
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:35
Top Results From Across the Web
"prettierApi.resolveConfig.sync is not a function" error when ...
when running the "Reformat with Prettier" action, the following error occurs: TypeError: prettierApi.resolveConfig.sync is not a function at PrettierPlugin.
Read more >API · Prettier
The promise will be rejected if there was an error parsing the configuration ... resolveConfig.sync(filePath [, options]) if you'd like to use sync...
Read more >prettier.resolveConfig JavaScript and Node.js code examples
How to use. resolveConfig. function. in. prettier ... resolveConfig.sync(file, { config: prettierConfigPath, }); try { const fileInfo = prettier.
Read more >How to use the prettier.resolveConfig function in prettier - Snyk
To help you get started, we've selected a few prettier.resolveConfig examples, based on popular ways it is used in public projects.
Read more >Prettier - Gitee
Do not look for a configuration file. The default settings will be used. --config-precedence. Defines how config file should be evaluated in combination...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Installing
prettier
dependency and restarting Atom both worked for me too :If it still not works for you, you also can downgrade
prettier-atom
to 0.38.0 version usingapm
:Finish by relaunching your editor.
thanks a lot @BroFox86
yarn add prettier -D
indeed solved the issue!