LoginSignup
6
2

More than 3 years have passed since last update.

vscodeでprettierが"Failed to load module"する

Posted at

エラーメッセージがうざってぇ!

どうやらprettierのパスがvscodeに渡っていないのが原因ぽい。

以下のコマンドを実行します。

npm i prettier -g

これのあと、vscodeのpreferences(設定画面)を開いて、その中でprettierを検索。
prettierのパスを設定できるところがあるので以下を入力。(もし別のところにprettierを入れた場合はそれを書いてください)

/usr/local/lib/node_modules/prettier

これで完了!!

まとめ

変なメッセージ出されるとテンション下がるのでやめてほしい。

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2