Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] TypeError: prettier.resolveConfig.sync is not a function #580

Closed
nhtruong opened this issue Aug 7, 2023 · 0 comments · Fixed by #581
Closed

[BUG] TypeError: prettier.resolveConfig.sync is not a function #580

nhtruong opened this issue Aug 7, 2023 · 0 comments · Fixed by #581
Assignees
Labels
🐛 bug Something isn't working untriaged

Comments

@nhtruong
Copy link
Collaborator

nhtruong commented Aug 7, 2023

When running $ eslint . we get this output

Oops! Something went wrong! :(

ESLint: 8.46.0

TypeError: prettier.resolveConfig.sync is not a function
Occurred while linting /home/runner/work/opensearch-js/opensearch-js/api/api/bulk.js:30
Rule: "prettier/prettier"
    at Program (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js:138:40)
    at ruleErrorHandler (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1050:28)
    at /home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:795:23)
    at /home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1085:32
    at Array.forEach (<anonymous>)
    at runRules (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1080:15)
    at Linter._verifyWithoutProcessors (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1330:31)
    at Linter._verifyWithConfigArray (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1706:21)
    at Linter.verify (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1412:65)
    at Linter.verifyAndFix (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/linter/linter.js:1967:29)
    at verifyText (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/cli-engine/cli-engine.js:254:48)
    at CLIEngine.executeOnFiles (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/cli-engine/cli-engine.js:834:28)
    at ESLint.lintFiles (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/eslint/eslint.js:551:23)
    at Object.execute (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/lib/cli.js:391:36)
    at async main (/home/runner/work/opensearch-js/opensearch-js/node_modules/eslint/bin/eslint.js:135:24)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This is blocking PRs from being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants