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

[Bug Report] Fonts as a dependency option does not work #238

Closed nanpx closed 3 years ago

nanpx commented 3 years ago

Environment

Browsers: Chrome 88.0.4324.182 OS: Mac OS 10.15.7 node: v14.15.5 npm: 6.14.11 @vue/cli: 4.5.11

Steps to reproduce

mkdir test
cd test
vue create . # default is fine
vue add vuetify

πŸ“¦  Installing vue-cli-plugin-vuetify...

+ vue-cli-plugin-vuetify@2.1.0
added 9 packages from 11 contributors and audited 1322 packages in 6.839s

69 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

βœ”  Successfully installed plugin: vue-cli-plugin-vuetify

? Choose a preset: Configure (advanced)
? Use a pre-made template? (will replace App.vue and HelloWorld.vue) Yes
? Use custom theme? Yes
? Use custom properties (CSS variables)? Yes
? Select icon font Material Design Icons
? Use fonts as a dependency (for Electron or offline)? Yes
? Use a-la-carte components? Yes
? Select locale English

πŸš€  Invoking generator for vue-cli-plugin-vuetify...
 WARN  invalid version range for dependency "@mdi/font":

- latest injected by generator "vue-cli-plugin-vuetify"
πŸ“¦  Installing additional dependencies...

added 16 packages from 11 contributors and audited 1338 packages in 5.677s

73 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

βš“  Running completion hooks...

βœ”  Successfully invoked generator for plugin: vue-cli-plugin-vuetify
 vuetify  Discord community: https://community.vuetifyjs.com
 vuetify  Github: https://github.com/vuetifyjs/vuetify
 vuetify  Support Vuetify: https://github.com/sponsors/johnleider

Expected Behavior

package.json should contain a dependency for @mdi/font and the node_modules/@mdi/font directory should exist.

Actual Behavior

npm throws a warning and the package.json does not contain the package (node_modules is missing the package too).

 WARN  invalid version range for dependency "@mdi/font"

$: ll node_modules/@mdi/font
ls: node_modules/@mdi/font: No such file or directory

This happens for all font options.

Reproduction Link

N/A

nanpx commented 3 years ago

@johnleider unfortunately https://github.com/vuetifyjs/vue-cli-plugins/pull/240 does not completely fix this bug, it only addresses the @mdi/font package. The md, fa, and fa4 keys in font.js still use the keyword "latest" for the version, which seems to be the culprit of the packages not being added to the package.json after the plugin has run.

ElijahKotyluk commented 3 years ago

@nanpx I just opened another PR for the remainder of the font dependencies.