1

I'm developing a module that uses Vue and Vuetify. They are peer dependencies because if they're not, I will have two instances of Vue, which is bad (one in the main app, and one in the module).

My problem is I want to use ESLint with Vue and Vuetify plugins, but ESLint seems to need Vue and Vuetify as real dependencies. If not, I've got the following error message when linting:

Error: Failed to load plugin 'vuetify' declared in '.eslintrc.js': Cannot find module 'vuetify/es5/components/VGrid/VContainer'
Daniel_Knights
  • 7,940
  • 4
  • 21
  • 49
Clément Picou
  • 4,011
  • 2
  • 15
  • 18

1 Answers1

1

eslint-plugin-vuetify needs the vuetify package for its grid-unknown-attributes rule.

The solution is to install the peer dependencies. With NPM 7+, the peer dependencies are automatically installed. For earlier NPM versions or Yarn users, the peer dependencies must be manually installed, which can be done with this command (using the npm-install-peers package):

npx npm-install-peers
tony19
  • 125,647
  • 18
  • 229
  • 307