javascriptnpmnuxt.jsbootstrap-vuecore-js

Nuxt build failure with core-js dependencies not found in ./node_modules/bootstrap-vue/:varisouspath


When I build my nuxt.js project, it spits out friendly error which is not so friendly.. I have done clean install (deleted package.lock and node_modules) installed core-js@2 and @babel/runtime-corejs2, but still getting these errors.

 ERROR  Failed to compile with 4 errors        friendly-errors 11:29:16

These dependencies were not found:             friendly-errors 11:29:16
                                               friendly-errors 11:29:16
* core-js/library/fn/array/from in ./node_modules/bootstrap-vue/es/utils/array.js
* core-js/library/fn/array/is-array in ./node_modules/bootstrap-vue/es/utils/array.js
* core-js/library/fn/object/assign in ./node_modules/bootstrap-vue/es/utils/object.js
* core-js/library/fn/object/is in ./node_modules/bootstrap-vue/es/utils/object.js
                                               friendly-errors 11:29:16
To install them, you can run: npm install --save core-js/library/fn/array/from core-js/library/fn/array/is-array core-js/library/fn/object/assign core-js/library/fn/object/is
ℹ Waiting for file changes

Solution

  • Had this exact issue on a CI build today. The issue turned out to be using v6 of node. Updating it to v9 fixed the issue.

    I'm no expert on Nuxt syntax but you should give the upgrade a try. For me it was a matter of of updating:

    image: node:6
    

    to

    image: node:9
    

    for my docker image.