Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../"
Использую сборщик Vite
. Запускаю собранную, production
версию при помощи LiveServer
Выдает данную ошибку в консоли
Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".
Так выглядит файл main.js
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import components from '@/components/UI'
import './assets/sass/style.sass'
const app = createApp(App)
components.forEach(component => {
app.component(component.name, component)
})
app.use(router).mount('#app')
А так же, ошибки при загрузке сторонних CSS
файлов
Refused to apply style from 'http://localhost:5500/css/bootstrap-grid.css' because
its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME
checking is enabled.
Так выглядит HTML
файл
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/bootstrap-grid.css">
<link rel="stylesheet" href="/css/icons.css">
<link rel="stylesheet" href="/css/donutChart.css">
<title></title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Источник: Stack Overflow на русском