question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Babel Errors in nuxt generate 2.14

See original GitHub issue

Describe the bug

I updated my nuxt project to the latest release which is 2.14. I then use nuxt generate to build the project. While nuxt is building the project, it gives this error

[BABEL] Note: The code generator has deoptimised the styling of \node_modules\bootstrap-vue\src\icons\icons.js as it exceeds the max of 500KB.

Steps to reproduce the bug

  1. Update the project to 2.14
  2. Use nuxt generate to build project
  3. It will display the error when compiling on the Client

Expected behavior

Should not have any errors

Versions

Libraries:

  • BootstrapVue: 2.16.0
  • Bootstrap: 4.5.0
  • Nuxt: 2.14.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:42 (6 by maintainers)

github_iconTop GitHub Comments

20reactions
amdpcommented, Sep 1, 2020

Hi, in the docs it is said the icons shouldn’t be loaded by default, but I get that error the same, both if I set

bootstrapVue: {
    icons: false  
}

and if I set no bootstrapVue property and just load the module. Do you know why?

18reactions
ghostcommented, Feb 6, 2021

@amdp BootstrapVue

Usage BootstrapVue icons ARE not automatically installed when using BootstrapVue in your project, you must explicitly include them.

I use them like so: // nuxt.config.js

modules: [
    // Doc: https://bootstrap-vue.js.org
    'bootstrap-vue/nuxt',
]

// icons.js in plugin folder

import Vue from 'vue'
import { 
    BootstrapVue, 
    BIcon, 
    BIconInfoSquare, 
    BIconInfoSquareFill,
} from 'bootstrap-vue'

Vue.use(BootstrapVue)
Vue.component('BIcon', BIcon)
Vue.component('BIconInfoSquare', BIconInfoSquare)
Vue.component('BIconInfoSquareFill', BIconInfoSquareFill),

And to avoid the above mentioned warning: // config.nuxt.js

build: {
    babel: {
      compact: true
    }
  }

Hope it helps

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fresh install of nuxt 2.14.6 contains babel "loose option ...
6 and I would like to silence an error I get when I run the nuxt command: WARN Though the "loose" option was...
Read more >
[Solved]-Nuxt js - Fresh install of nuxt 2.14.6 contains babel "loose ...
It looks like some errors are back again with the latest release, more info can be found here Latest Nuxt v2.15.7 install with...
Read more >
The build Property - Nuxt
Customize Babel configuration for JavaScript and Vue files. .babelrc is ignored by default. Type: Object; See babel-loader options and babel options; Default: { ......
Read more >
Nuxt.js — Babel Preset Errors - Medium
So today, I went in today to try and create a new Nuxt.js project from scratch. Most unfortunately (!) — I couldn't get...
Read more >
https://corp.antel.com.uy/repo/kit-iot-publico/kit...
... resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.0. ... "@nuxt/babel-preset-app" "2.14.6" "@nuxt/friendly-errors-webpack-plugin" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found