Gridsome: TypeError: Cannot destructure property `collection` of 'undefined' or 'null'

Created on 13 May 2019  路  1Comment  路  Source: gridsome/gridsome

Description

Trying to update the Bleda starter to Gridsome 0.6, I just ran into this.

Steps to reproduce

First, fix the feedItemOptions in gridsome.config.js, as I didn't push anything yet and this error will be triggered before the type error (node.fields.* becomes nodes.*).

Then, run gridsome build.

Expected result

Build to run without errors.

Actual result

$ gridsome build
Gridsome v0.6.0

Initializing plugins...
Initialize - 0.72s
Load sources - 0.07s
Create GraphQL schema - 0.13s
Create pages and templates - 0.03s
Generate code - 0.02s
Bootstrap finish - 0.97s
TypeError: Cannot destructure property `collection` of 'undefined' or 'null'.
    at calcTotalPages (D:\DEV\open-source\gridsome-starter-bleda\node_modules\gridsome\lib\pages\createRenderQueue.js:26:32)
    at createRenderQueue (D:\DEV\open-source\gridsome-starter-bleda\node_modules\gridsome\lib\pages\createRenderQueue.js:11:26)
    at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (D:\DEV\open-source\gridsome-starter-bleda\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:16)
    at AsyncSeriesWaterfallHook.lazyCompileHook (D:\DEV\open-source\gridsome-starter-bleda\node_modules\tapable\lib\Hook.js:154:20)
    at Promise (D:\DEV\open-source\gridsome-starter-bleda\node_modules\gridsome\lib\build.js:49:33)
    at new Promise (<anonymous>)
    at createRenderQueue (D:\DEV\open-source\gridsome-starter-bleda\node_modules\gridsome\lib\build.js:48:10)
    at module.exports (D:\DEV\open-source\gridsome-starter-bleda\node_modules\gridsome\lib\build.js:21:23)

Libs:
- gridsome version: 0.6.0
- @gridsome/cli version: 0.1.0

For Tooling issues:
- Node version: v10.14.1
- Platform:   Windows 10

Installed dependencies:

  "dependencies": {
    "@fullhuman/postcss-purgecss": "^1.2.0",
    "@gridsome/plugin-google-analytics": "^0.1.0",
    "@gridsome/plugin-sitemap": "^0.1.1",
    "@gridsome/source-filesystem": "^0.4.1",
    "@gridsome/transformer-remark": "^0.3.0",
    "gridsome": "^0.6.0",
    "gridsome-plugin-remark-shiki": "^0.3.0",
    "gridsome-plugin-rss": "^1.1.0",
    "medium-zoom": "^1.0.4",
    "moment": "^2.24.0",
    "vue-parallaxy": "^1.1.1"
  },
  "devDependencies": {
    "postcss-import": "^12.0.1",
    "postcss-nested": "^4.1.2",
    "tailwindcss": "^1.0.0",
    "tailwindcss-transitions": "^1.0.4"
  }
bug

Most helpful comment

Found the issue. I'll release a fix today :)

>All comments

Found the issue. I'll release a fix today :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

martifenosa picture martifenosa  路  3Comments

nolfranklin picture nolfranklin  路  3Comments

tomtev picture tomtev  路  3Comments

cyrilf picture cyrilf  路  3Comments

MarcoFaul picture MarcoFaul  路  3Comments