nuxt-community / pwa-template

PWA template for vue-cli based on the starter template
MIT License
133 stars 12 forks source link

TypeError: Cannot read property 'push' of undefined #7

Closed fabionolasco closed 7 years ago

fabionolasco commented 7 years ago

Hi,

I just ran the installation and trying to build the project as is, but got an issue.

Here are the steps:

$ vue init nuxt-community/pwa-template my-project $ cd my-project $ npm installl

Everything ran well to this point. But then...

$ npm run build

The error message is:

~/Dev/my-project $ npm run build

my-project@1.0.0 build /Users/admin/Dev/my-project nuxt build

nuxt:build Building... +0ms nuxt:build App root: /Users/admin/Dev/my-project +950ms nuxt:build Generating /Users/admin/Dev/my-project/.nuxt files... +0ms TypeError: Cannot read property 'push' of undefined at ModuleContainer.nuxtCssano (/Users/admin/Dev/my-project/node_modules/@nuxtjs/cssnano/index.js:4:29) at /Users/admin/Dev/my-project/node_modules/nuxt/lib/core/module.js:133:29 at ModuleContainer._callee2$ (/Users/admin/Dev/my-project/node_modules/nuxt/lib/core/module.js:132:12) at tryCatch (/Users/admin/Dev/my-project/node_modules/nuxt/node_modules/regenerator-runtime/runtime.js:65:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/admin/Dev/my-project/node_modules/nuxt/node_modules/regenerator-runtime/runtime.js:303:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/admin/Dev/my-project/node_modules/nuxt/node_modules/regenerator-runtime/runtime.js:117:21) at step (/Users/admin/Dev/my-project/node_modules/nuxt/dist/nuxt.js:852:30) at /Users/admin/Dev/my-project/node_modules/nuxt/dist/nuxt.js:863:13 at process._tickCallback (internal/process/next_tick.js:109:7) [nuxt] Unhandled promise rejection: TypeError: Cannot read property 'push' of undefined nuxt:build Generating files... +37ms nuxt:build Generating routes... +8ms nuxt:build Building files... +27ms build [================== ] 91%Hash: fbadd386fdb09952e0d6 Version: webpack 3.4.1 Time: 8956ms Asset Size Chunks Chunk Names server-bundle.json 248 kB [emitted] Build completed in 8.999s

Hash: 9b7eaba6053ecf6ff8e6 Version: webpack 3.4.1 Time: 9005ms Asset Size Chunks Chunk Names icons/icon_16.9qid3ZBUcQn.png 484 bytes [emitted] 0.nuxt.bundle.5db9ce6220aa87a1f6ae.js 9.06 kB 0 [emitted] pages/index vendor.bundle.b2675562e4dda4754ce1.js 144 kB 2 [emitted] vendor nuxt.bundle.25f2f390166067f59e50.js 26 kB 3 [emitted] app manifest.9b7eaba6053ecf6ff8e6.js 1.54 kB 4 [emitted] manifest 0.nuxt.bundle.5db9ce6220aa87a1f6ae.js.map 4.44 kB 0 [emitted] pages/index 1.nuxt.bundle.35041c3db3229e3fe396.js.map 1.69 kB 1 [emitted] layouts/default vendor.bundle.b2675562e4dda4754ce1.js.map 228 kB 2 [emitted] vendor nuxt.bundle.25f2f390166067f59e50.js.map 41.2 kB 3 [emitted] app manifest.9b7eaba6053ecf6ff8e6.js.map 2.81 kB 4 [emitted] manifest 1.nuxt.bundle.35041c3db3229e3fe396.js 2.95 kB 1 [emitted] layouts/default icons/icon_120.9qid3ZBUcQn.png 4.69 kB [emitted] icons/icon_144.9qid3ZBUcQn.png 6.09 kB [emitted] icons/icon_152.9qid3ZBUcQn.png 6.53 kB [emitted] icons/icon_192.9qid3ZBUcQn.png 9.23 kB [emitted] icons/icon_384.9qid3ZBUcQn.png 28.4 kB [emitted] icons/icon_512.9qid3ZBUcQn.png 45.5 kB [emitted] manifest.7f98320e.json 785 bytes [emitted] index.ssr.html 132 bytes [emitted] index.spa.html 398 bytes [emitted] vue-ssr-client-manifest.json 7.58 kB [emitted] nuxt:build Building done +9s

This question is available on Nuxt.js community (#c6)