Linda Keating
Linda Keating

Reputation: 2435

Importing Bootstrap to Vue 3 causes net::ERR_ABORTED 504 (Gateway Timeout)

I am following the instructions here but when I add the line import "bootstrap/dist/js/bootstrap.js" to the main.js file I get the error on the network net::ERR_ABORTED 504 (Gateway Timeout) and a blank white screen. Nothing renders. When I comment out that import bootstrap/dist/js/bootstrap.js the app works as expected.

This is what I have in the main.js file:

import { createApp } from 'vue'
import App from './App.vue';

import './assets/main.css';


createApp(App).mount('#app');

import "bootstrap/dist/js/bootstrap.js"```



This is my package.json details.


```  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@popperjs/core": "^2.11.6",
    "bootstrap": "^5.2.2",
    "vue": "^3.2.44"
  },
  "devDependencies": {
    "@vitejs/plugin-vue": "^3.1.2",
    "vite": "^3.1.8"
  }

Any ideas?

Upvotes: 0

Views: 5054

Answers (1)

bibhas ash
bibhas ash

Reputation: 176

You just need to restart the server thats it

Upvotes: 5

Related Questions