Vue-cli: Can't create new projects that uses prettier

Created on 18 Jul 2019  路  4Comments  路  Source: vuejs/vue-cli

Version

3.9.2

Environment info

  System:
    OS: Windows 10
    CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.10.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

  • Run vue create sample-app
  • Pick "Manually select features"
  • Check "Linter"
  • Select "Prettier"
  • Pick "Lint on Save"

What is expected?

A new project is created.

What is actually happening?

The following error is thrown Error: Failed to load plugin prettier: Cannot find module 'eslint-plugin-prettier'

bug

Most helpful comment

The same occurs on old project when deleting yarn.lock/package-lock.json and reinstalling dependencies.

Installing manually "eslint-plugin-prettier" fixes the error, but I believe that this should be a dependency of "@vue/eslint-config-prettier" maybe...

All 4 comments

The same occurs on old project when deleting yarn.lock/package-lock.json and reinstalling dependencies.

Installing manually "eslint-plugin-prettier" fixes the error, but I believe that this should be a dependency of "@vue/eslint-config-prettier" maybe...

Same here.
image

Same issue.

yarn install eslint-plugin-prettier solved the problem.

@gabemule You are probably correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgribonvald picture jgribonvald  路  3Comments

joshuajohnson814 picture joshuajohnson814  路  3Comments

PrimozRome picture PrimozRome  路  3Comments

BusyHe picture BusyHe  路  3Comments

Benzenes picture Benzenes  路  3Comments