Reputation: 189
I'm trying to download vuetify 3 on my vue 3 app and it's giving me this error. I've tried the npm install --save @popperjs/core vuetify/styles but it doesn't work. I'd like to know what's the reason behind this I know its still in beta but it should be stable.
Failed to compile with 2 errors
These dependencies were not found:
- @popperjs/core in ./node_modules/bootstrap/dist/js/bootstrap.esm.js
- vuetify/styles in ./src/plugins/vuetify.js
To install them, you can run: npm install --save @popperjs/core vuetify/styles Error from chokidar (C:): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp' Terminer le programme de commandes (O/N) ? O
npm install --save @popperjs/core vuetify/styles
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/vuetify/styles.git
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PC\AppData\Local\npm-cache\_logs\2022-03-28T19_25_57_260Z-debug-0.log
Upvotes: 2
Views: 1809
Reputation: 138636
vuetify/styles
is not an NPM package, so don't try to install that. vuetify
is the package name, and styles
is contained in vuetify
.
To install Vuetify 3 in a Vite project:
Install vuetify
3.x (currently in the next
tag):
npm i -S vuetify@next
Install @vuetify/vite-plugin
as a dev dependency:
npm i -D @vuetify/vite-plugin
Configure Vite to use the plugin above:
// vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vuetify from '@vuetify/vite-plugin' 👈
export default defineConfig({
plugins: [
vue(),
vuetify() 👈
],
})
Create a Vuetify plugin instance, and install it in your Vue app:
// plugins/vuetify.js
import { createVuetify } from 'vuetify'
import 'vuetify/styles'
export default createVuetify()
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import vuetify from './plugins/vuetify'
createApp(App)
.use(vuetify) 👈
.mount('#app')
Upvotes: 2