vuetifyjs / vue-cli-plugins

🔌 A collection of Vuetify plugins for Vue CLI
https://vuetifyjs.com/en/getting-started/quick-start#vue-cli-3
Other
427 stars 113 forks source link

Upgrade vue-cli-plugin-vuetify null-loader dependency for use with webpack 5 #254

Closed lgarczyn closed 3 years ago

lgarczyn commented 3 years ago

Currently getting this error after "vue add vuetify"

null-loader@3.0.0 requires a peer of webpack@^4.3.0 but none is installed. You must install peer dependencies yourself.
ElijahKotyluk commented 3 years ago

Would you be able to give me the steps you took to produce this?

lgarczyn commented 3 years ago

use these dependencies:

{
  "dependencies": {
    "core-js": "^3.9.1",
    "reflect-metadata": "^0.1.13",
    "ts-vue-plugin": "^0.1.3",
    "vue": "^2.6.12",
    "vuetify": "^2.4.7",
  },
  "devDependencies": {
    "@vue/cli-service": "^5.0.0-alpha.7",
    "vue-cli-plugin-vuetify": "^2.3.1",
    "vue-template-compiler": "^2.6.12",
    "vuetify-loader": "^1.7.2"
  }
}

run npm i

This gives no peer dep warning. Webpack version becomes 5.26.3

run npm i vue-cli-plugin-vuetify@latest

npm WARN cache-loader@4.1.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN null-loader@3.0.0 requires a peer of webpack@^4.3.0 but none is installed. You must install peer dependencies yourself.
ElijahKotyluk commented 3 years ago

Thank you, I’ll take a look

Logikgate commented 3 years ago

With npm 7 this becomes an error that doesn't let you install without using --force. Looks like null-loader was deprecated and removed in webpack 5 and replaced with a configuration option for ignoring modules.

ref: https://github.com/webpack-contrib/null-loader