작성
·
188
·
수정됨
0
import { fileURLToPath, URL } from 'node:url'
import Components from 'unplugin-vue-components/vite'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
Components({
dirs: [''],
dts: true
}),
],
// mode: 'production',
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
outDir: 'dist'
}
})
failed to load config from C:\Users\woon\Desktop\frontend\urround-service\vite.config.js
error when starting dev server:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'unplugin-vue-components' imported from C:\Users\woon\Desktop\frontend\urround-service\vite.config.js.timestamp-1724040920571-652e4de7c8db4.mjs
at packageResolve (node:internal/modules/esm/resolve:854:9)
at moduleResolve (node:internal/modules/esm/resolve:927:18)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:227:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
at link (node:internal/modules/esm/module_job:86:36)
npm run dev시 위와 같은 에러가 납니다.
어느 부분을 봐야할까요?
unplugin-vue-components install 도 해보았습니다
답변 1
0