Nuxtjs app experiences compatibility issues with Bootstrap templates

Greetings to all who come across this issue. I am currently working on a project using Nuxt.js with the Bootstrap template. The header and footer are displaying correctly, but the problem lies in the design of the body not showing up.

https://i.stack.imgur.com/CjDXo.png

I have added CSS and font files in the assets folder as shown below:

https://i.stack.imgur.com/4CUgK.png

Here is my nuxt.config.js file:


export default {
   mode: 'universal',
  env: {

  },
  
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'algso-web',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/logo.gif' },
      { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800,900&display=swap' }
    ],
    script:[
    { src:"/js/aos.js" },
    { src:"/js/bootstrap.min.js" },
    {src: "/js/google-map.js"},
    {src: "/js/jquery-3.2.1.min.js"},
    {src: "/js/jquery-migrate-3.0.1.min.js"},
    {src: "/js/jquery.animateNumber.min.js"},
    {src: "/js/jquery.easing.1.3.js"},
    {src: "/js/jquery.magnific-popup.min.js"},
    {src: "/js/jquery.min.js"},
    {src: "/js/jquery.stellar.min.js"},
    {src: "/js/jquery.waypoints.min.js"},
    {src: "/js/main.js"},
    {src: "/js/owl.carousel.min.js"},
    {src: "/js/popper.min.js"},
    {src: "/js/scrollax.min.js"}
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    '~/assets/css/bootstrap/bootstrap-grid.css',
    '~/assets/css/bootstrap/bootstrap-reboot.css',
    '~/assets/css/animate.css',
    '~/assets/css/aos.css',
    '~/assets/css/bootstrap.min.css',
    '~/assets/css/flaticon.css',
    '~/assets/css/icomoon.css',
    '~/assets/css/ionicons.min.css',
    '~/assets/css/magnific-popup.css',
    '~/assets/css/open-iconic-bootstrap.min.css',
    '~/assets/css/owl.carousel.min.css',
    '~/assets/css/owl.theme.default.min.css',
    '~/assets/css/style.css'

  ],
  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
   
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
  ],

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
  }
}

The issue is that the slider and carousel elements are not visible and the body design is missing on the home page. Below is the code snippet from my homepage design file:

<template>
  <div>
    <section class="home-slider owl-carousel owl-theme">
      <div class="slider-item" style="background-image:url(/images/bg_1.jpg);">
        <div class="overlay"></div>
        .
        . <!-- More HTML code goes here -->
        .
      </div>

      <div class="slider-item" style="background-image:url(/images/bg_2.jpg);">
        <div class="overlay"></div>
        .
        . <!-- More HTML code goes here -->
        .
      </div>
    </section>
    <section class="ftco-section">
      <div class="container">
        .
        . <!-- More HTML code goes here -->
        .
      </div>
    </section>
  </div>
</template>

Answer №1

To efficiently integrate BootstrapVue with Nuxt, a straightforward approach is to directly incorporate it into your project following the guidelines in the official documentation.

This method avoids the clutter of importing static code from the public folder.

yarn add bootstrap-vue

nuxt.config.js

module.exports = {
  modules: ['bootstrap-vue/nuxt']
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with Vue JS function not providing the desired array output

I declared a property in my data model like this: someArray: [] A function returns an array: getMyArray: function (someId) { var result = [7, 8, 9, 10]; return result; } I'm assigning the result of the function to m ...

VueJS form validation does not account for empty inputs in both fields

One of the challenges I'm facing is generating a form with Vue.js using the input fields below: { name: 'first_name', type: 'text', label: 'First Name', placeholder: 'First Name', ...

Examining a V-If using Jest for unit testing

How can I effectively test the v-if condition in my parent component using Jest? Parent Component: <div class="systemIsUp" v-if="systemStatus == true"> foo </div> <div class="systemIsDown" v-e ...

What is the most effective way to conceal the textbox when one of the select option boxes is chosen?

<div class="flex w-full"> <select placeholder="Sort By" v-model="criminal.sortBy" class="bg-grey-lightest border p-2 border-gray mr-4 h-10 w-1/2 rounded-sm font-basic mt-2 mb-4"> <option>----------------------- ...

A step-by-step guide on how to capture user input in Vue.js after the "

Is there a way to capture the character entered after a key is pressed or after the user presses the enter key? I tried using the npm package npm i vue-keypress, but I couldn't figure out how to capture the characters. Can you suggest another method ...

Vue.Js allows developers to easily set a default selected value in a select dropdown menu

Having trouble with getting the default selected value using select in VueJs. I've attempted two different approaches: Using id and v-model fields in the select like this: <select v-model="sort_brand" id="sort-brand" class="form-control"> ...

Tips for ensuring equal height and width for a card using the <v-flex auto> component

I am in the process of organizing a set of cards, all of which need to be the same size. Check out an example I have created here: https://codepen.io/creativiousa/pen/BErpPb I attempted to modify my code using <v-card height='100%'> </ ...

Exploring Vue 3 and Accessing Objects in Arrays

I need help generating passwords reactively using an array object inside my instance. I am able to list this object with v-for and generate random passwords with characters in a passArry. However, I am struggling to send chars in data to the passArray wh ...

`I encountered some challenges while trying to integrate Firebase with my Vue.js application`

Currently, I am in the process of integrating Firebase into my Vue.js application. After setting up Vue.js using Vue CLI, installing firebase, vuefire, and bootstrap-vue, I attempted to retrieve data manually inserted into my database but encountered issue ...

Integrating Vue Router with a CFML (Lucee) server

I have a Vue Router set up that is working flawlessly for navigation using <router-link to="/test">test</router-link>, but when I manually type the URL into the browser like , it reloads the page and shows a 404 error. On the server-side, I ...

Encountering an npm error: How can I install compiler-sfc that satisfies the peer dependency requirement for @babel/core?

Review of my packageJSON "devDependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@vue/compiler-sfc": "^3. ...

What is the best way to create a new row within a Bootstrap table?

Struggling to format an array inside a table with the `.join()` method. The goal is to have each car on a separate row. Attempts using `.join("\r\n")` and `.join("<br />")` have been unsuccessful. What am I overlooking? ...

"Learn the steps to enable a click-to-select feature for an item, allowing you to drop it in a different location

I've been spending quite some time trying to come up with a solution for my dilemma. The issue arises because I'm not looking to use drag and drop functionality. https://i.stack.imgur.com/Nh1Db.png My goal is to have 3 divs named 1,2,3 as desig ...

Error: The function WEBPACK_IMPORTED_MODULE_0___default.a.Textract in VueJS is not recognized as a constructor

Recently, I encountered an issue while trying to incorporate Textract into VueJs. The error message "aws_sdk__WEBPACK_IMPORTED_MODULE_0___default.a.Textract is not a constructor" kept appearing despite using aws-sdk version 2.450.0. This problem has left m ...

How can I increase the index by 2 in a Vue.js v-for loop?

Below is an example of the code snippet: The code makes use of <ul> to loop through 7 times, where each iteration prints arr[0] and arr[1] inside the <li> tag. However, the requirement is to increment the index value by 2 for each subsequent ...

Stop horizontal overflow of content

This unique Vuetify demo on CodePen showcases a two-column layout. The first column contains a <v-list> enclosed in a green <v-alert>. By clicking the "toggle text" button, you can switch the title of the first list item between short and long ...

Vue combined with modules for namespace management

I seem to be facing a problem that I thought I had solved before by using namespaces, but unfortunately nothing seems to be working. Here's my module: const Algo1Module = { namespaced: true, state: { questions: { question1: "test&qu ...

Passing Parameters Using Axios in Vue.js

Currently, I am utilizing Axios within VueJS to make ajax requests. However, I have encountered an issue when attempting to send these requests. This snippet shows my JavaScript code: axios.post('http://localhost/app/php/search.php', { quer ...

"Enhance your development experience with the TypeScript definitions for the Vue 2 plugin

Currently, I am utilizing VSCode alongside TypeScript classes for developing Vue 2 components. You can check out more information at: vuejs/vue-class-component. Within my present project, I make use of plugins like vue-i18n for handling translations of la ...

Encountering a problem while running npm build (PostCSS plugin postcss-purgecss needs PostCSS 8) on vuejs3 with tailwind

I'm currently in the process of developing an application using Vue.js 3 and Tailwind CSS. While testing some configurations before diving into the project, I encountered a specific error message when running npm run build: ERROR Failed to compile wit ...