tauri-apps / vue-cli-plugin-tauri

Turn your Vue SPA into a lightweight cross-platform desktop app
https://tauri.studio
MIT License
372 stars 23 forks source link

`vue-cli-plugin-tauri` does not have a generator #24

Closed mainrs closed 3 years ago

mainrs commented 3 years ago

Describe the bug My current project uses yarn v2 with pnp enabled. Running vue add tauri results in this output. I also manually ran vue invoke to try to install it that way

$ vue add tauri
 WARN  There are uncommitted changes in the current repository, it's recommended to commit or stash them first.
? Still proceed? Yes

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

➀ YN0000: β”Œ Resolution step
➀ YN0002: β”‚ @vue/babel-plugin-jsx@npm:1.0.5 doesn't provide @babel/core (p60e01), requested by @babel/plugin-syntax-jsx
➀ YN0000: β”‚ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➀ YN0000: β”” Completed in 0s 342ms
➀ YN0000: β”Œ Fetch step
➀ YN0000: β”” Completed in 1s 528ms
➀ YN0000: β”Œ Link step
➀ YN0000: β”” Completed in 0s 491ms
➀ YN0000: Done with warnings in 2s 682ms
βœ”  Successfully installed plugin: vue-cli-plugin-tauri

Plugin vue-cli-plugin-tauri does not have a generator to invoke

$ vue invoke tauri
 WARN  There are uncommitted changes in the current repository, it's recommended to commit or stash them first.
? Still proceed? Yes
 ERROR  Error: Plugin vue-cli-plugin-tauri does not have a generator.
Error: Plugin vue-cli-plugin-tauri does not have a generator.
    at invoke ($HOME/.config/yarn/global/node_modules/@vue/cli/lib/invoke.js:55:11)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

Environment (please complete the following information):

yarn run [--inspect] [--inspect-brk] ...



**Additional context**
Add any other context about the problem here.
mainrs commented 3 years ago

I could solve it by temporarily switching back to the old behaviour that uses node_modules, running vue add tauri and enabling pnp again:

# .yarnrc.yml
nodeLinker: node-modules
nklayman commented 3 years ago

This is an issue with Vue CLI, not this plugin. See https://github.com/vuejs/vue-cli/issues/2850 for more details. Vue CLI doesn't yet support yarn pnp, but when it does I will reopen this if it is still a problem.

mainrs commented 3 years ago

Thanks for letting me know!