nuxt-community / legacy-modules

MIT License
1.29k stars 156 forks source link

Using @nuxtjs/bootstrap-vue causes This relative module was not found #178

Open martijnhiemstra opened 6 years ago

martijnhiemstra commented 6 years ago

I have started a blank Nuxt.js project. I install the @nuxtjs/bootstrap-vue module and I add the module to my nuxt.config.js file. My module section looks like this:

modules: [
    '@nuxtjs/axios',
    '@nuxtjs/bootstrap-vue'
],

When I run npm run dev I get an error

This relative module was not found:

* ../bootstrap/dist/css/bootstrap.css in ./node_modules/babel-loader/lib?{"babelrc":false,"cacheDirectory":true,"presets":["/home/martijn/Projects/training/node_modules/babel-preset-vue-app/dist/index.common.js"]}!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./.nuxt/App.vue

Looks like a bug in the @nuxtjs/bootstrap-vue module. How can I fix this?

This question is available on Nuxt.js community (#c110)
junqdu commented 6 years ago

also seeing this issue

junqdu commented 6 years ago

@martijnhiemstra I have figured it out. In nuxt.config.js, change

  modules: [
    '@nuxtjs/bootstrap-vue'',

    // Or if you have custom bootstrap CSS...
    ['@nuxtjs/bootstrap-vue', { css: false }],
  ],

to

  modules: [
    // Or if you have custom bootstrap CSS...
    ['@nuxtjs/bootstrap-vue', { css: false }],
  ],
redcpp commented 6 years ago

I solved it by installing bootstrap too

npm install bootstrap@4.0.0-beta.3

Then restart the server and reload the website