Skip to content

nuxt build fails TypeError: Cannot read property 'push' of undefined - v2.0.0-rc.18 #3141

Closed
@sgarwood

Description

@sgarwood

Describe the bug

nuxt build fails in 2.0.0-rc.18 with the error message "Cannot read property 'push' of undefined"

The issue appears to be on line 51 in nuxt/index.js

Steps to reproduce the bug

  1. npm install
  2. npm audit fix
  3. npm run build
  4. See error

Expected behavior

A successful build and app can then be started with npm run start

Versions

Libraries:

  • BootstrapVue: 2.0.0-rc.18
  • Bootstrap: 4.3.1
  • Vue: 2.5.17

Environment:

  • OS: Ubuntu 18.04

Additional context

Full CLI output

$ npm run build

> tpp@1.0.0 build /app
> nuxt build

  nuxt:build Building... +0ms
… debug nuxt › axios › baseURL: https://nginx/api
… debug nuxt › axios › browserBaseURL: https://api.thepuddingpit.localhost/api
  nuxt: Call build:before hooks (1) +0ms
  nuxt: Call error hooks (1) +3ms

 ERROR  build:before

  TypeError: Cannot read property 'push' of undefined
  
  - index.js:51 nuxt.hook
    [app]/[bootstrap-vue]/nuxt/index.js:51:34
  
  - nuxt.js:122 fn
    [app]/[nuxt]/lib/core/nuxt.js:122:47
  
  - utils.js:96 promise.then
    [app]/[nuxt]/lib/common/utils.js:96:43
  
  - next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7
  
  - loader.js:757 Function.Module.runMain
    internal/modules/cjs/loader.js:757:11
  
  - node.js:283 startup
    internal/bootstrap/node.js:283:19
  
  - node.js:622 bootstrapNodeJSCore
    internal/bootstrap/node.js:622:3
  

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tpp@1.0.0 build: `nuxt build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tpp@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-19T19_38_03_120Z-debug.log

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions