question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using prettierPath says i'm using an outdated version of prettier but it's prettier@1.19.1 latest

See original GitHub issue

Summary

Your project is configured to use an outdated version of prettier. You may encounter issues. It is recommended you upgrade to the latest version of prettier.

  "prettier.prettierPath": "./node_modules/.bin/prettier"
❯ ~/work/project/node_modules/.bin/prettier -v
1.19.1

[INFO - 10:19:39 AM] Formatting ~/work/project/frontend/src/containers/EditSiteContainer.js.
[INFO - 10:19:39 AM] Loaded module 'prettier@undefined' from '~/work/project/node_modules/.bin/prettier'.
[ERROR - 10:19:39 AM] Outdated version of prettier installed. Falling back to bundled version of prettier.

Github Repository to Reproduce Issue

Link to a Github repo that can be used to reproduce the issue.

Steps To Reproduce:

  1. Use prettierPath to point to locally installed prettier

Expected result

Since 1.19.1 is the latest version, I expect prettier-vscode to use it

Actual result

Falls back to bundled version of prettier

Additional information

VS Code Version:

1.40.0
86405ea23e3937316009fc27c9361deee66ffbf5
x64

Prettier & Prettier Plugin Version:

prettier@1.19.1
prettier-vscode@3.3.0

**OS and version**:
macOS 10.15.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
ntottencommented, Nov 12, 2019

Try setting the option to "prettier.prettierPath": "./node_modules/prettier" rather than the bin location.

0reactions
github-actions[bot]commented, Apr 12, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In VS Code, I'm getting this error, 'Failed to load module ...
It seems like some path is broken on my machine or something is missing. We have a package.json with a script to run...
Read more >
Install - Prettier
Note: If you forget to install Prettier first, npx will temporarily download the latest version. That's not a good idea when using Prettier, ......
Read more >
Prettier - Code formatter - Visual Studio Marketplace
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that ......
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
You can configure JavaScript code auto-formatting with Prettier to work per-project. This allows you to get a consistent formatting without ...
Read more >
Using Prettier and ESLint to automate formatting and fixing ...
Learn how to use ESLint and Prettier together to automatically format and fix JavaScript code in your projects.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found