How can i solve "loading error module" for Prettier?

17 Views Asked by At

I tried adding Prettier to a random project to get familiar with the setup but after I installed the plugin I can't seem to get past this error, and I searched for hours.

(photo) prettier error message

i use: Vite - Vue & Yarn

i tried:

  1. updating the path in settings.json after running yarn dlx @yarnpkg/sdks base
{
    "editor.formatOnSave": true,
    "prettier.prettierPath": "./.yarn/sdks/prettier/index.cjs",
}

or

{
    "editor.formatOnSave": true,
    "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
}
  1. Changing the Prettier Path in VSCode settings with C:\Users\Denis\AppData\Roaming\npm\node_modules\prettier or \AppData\Roaming\npm\node_modules\prettier

  2. Changing the path in settings.json as in section 2.

  3. npm install --save-dev prettier

I guess there is a path issue or something? Any help is appreciated

0

There are 0 best solutions below