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] Vuetify breaks on useVite check #255

Closed AxelTimanMobina closed 3 years ago

AxelTimanMobina commented 3 years ago

Environment

Browsers: Chrome 89.0.4389.90 OS: Linux x86_64 Vue CLI: @vue/cli 4.5.11

Steps to reproduce

  1. Using vue ui create new project
  2. Pick npm as package manager
  3. Choose Vue 3 preview as preset. (Manually picking Vue 3 also results in same error.)
  4. cd to app
  5. vue add vuetify
  6. Pick v3 (alpha)

Expected Behavior

Vue CLI installs v3 alpha version of plugin and adds to project.

Actual Behavior

Vue CLI tries to install v2.3.0 of plugin, breaks on line 18 of /usr/local/lib/node_modules/@vue/cli/node_modules/ejs/lib/ejs.js

ERROR output:

🚀  Invoking generator for vue-cli-plugin-vuetify...
 ERROR  ReferenceError: ejs:18
    16|         </h1>
    17| 
 >> 18| <%_ if (useVite) { _%>
    19|           <small>Vite Preview</small>
    20| <%_ } _%>
    21| 

useVite is not defined
ReferenceError: ejs:18
    16|         </h1>
    17| 
 >> 18| <%_ if (useVite) { _%>
    19|           <small>Vite Preview</small>
    20| <%_ } _%>
    21| 

useVite is not defined
    at eval (eval at compile (/usr/local/lib/node_modules/@vue/cli/node_modules/ejs/lib/ejs.js:652:12), <anonymous>:12:8)
    at anonymous (/usr/local/lib/node_modules/@vue/cli/node_modules/ejs/lib/ejs.js:682:17)
    at Object.exports.render (/usr/local/lib/node_modules/@vue/cli/node_modules/ejs/lib/ejs.js:419:37)
    at renderFile (/usr/local/lib/node_modules/@vue/cli/lib/GeneratorAPI.js:534:14)
    at /usr/local/lib/node_modules/@vue/cli/lib/GeneratorAPI.js:312:27
    at Generator.resolveFiles (/usr/local/lib/node_modules/@vue/cli/lib/Generator.js:268:13)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Generator.generate (/usr/local/lib/node_modules/@vue/cli/lib/Generator.js:175:5)
    at async runGenerator (/usr/local/lib/node_modules/@vue/cli/lib/invoke.js:111:3)
    at async invoke (/usr/local/lib/node_modules/@vue/cli/lib/invoke.js:92:3)

I cannot find Vite being one of the dependencies of Vuetify v3 (alpha).

Reproduction Link

ElijahKotyluk commented 3 years ago

This was resolved with this commit.