Skip to content

Blog Plugin broken #1371

Closed
Closed
@tedmiston

Description

@tedmiston
  • I confirm that this is an issue rather than a question.

Bug report

I'm experiencing an issue on alpha.40 where the blog plugin causes VuePress to crash on startup.

Both disabling the blog plugin in the config and/or downgrading VuePress and the plugin to alpha.37 seem to work sucessfully, however, I cannot get the blog plugin to work on versions > v1.0.0-alpha.37.

Edit: I misspoke — downgrading does not seem to resolve the error, only disabling the plugin entirely.

Please let me know if you have any ideas how to resolve or if I have missed something in the setup.

Version

Versions:

$ yarn run vuepress --version
yarn run v1.13.0
warning package.json: No license field
$ /Users/taylor/vuepress-blog-test/node_modules/.bin/vuepress --version
vuepress/1.0.0-alpha.40 darwin-x64 node-v11.9.0
✨  Done in 0.52s.
$ yarn --version
1.13.0
$ npm --version
6.7.0
$ node --version
v11.9.0

Steps to reproduce

Steps to reproduce:

mkdir vuepress-blog-test
cd vuepress-blog-test
yarn add vuepress@next
yarn add -D @vuepress/plugin-blog@next

I followed the directions at https://v1.vuepress.vuejs.org/plugin/official/plugin-blog.html to configure the blog plugin.

Config:

$ cat .vuepress/config.js
module.exports = {
  title: 'Foo',
  plugins: [
    '@vuepress/blog'
  ]
}

What is expected?

I expect VuePress to start normally including the Blog Plugin.

What is actually happening?

VuePress crashes on startup.

Trying to run dev mode:

$ yarn run vuepress dev
yarn run v1.13.0
warning package.json: No license field
$ /Users/taylor/vuepress-blog-test/node_modules/.bin/vuepress dev
wait Extracting site metadata...
tip Apply theme @vuepress/theme-default
warning Cannot read property 'Categories' of undefined
TypeError: Cannot read property 'multiple' of undefined
    at PluginAPI.use (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/plugin-api/index.js:94:16)
    at pluginsConfig.forEach (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/plugin-api/index.js:139:12)
    at Array.forEach (<anonymous>)
    at PluginAPI.useByPluginsConfig (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/plugin-api/index.js:138:19)
    at PluginAPI.use (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/plugin-api/index.js:105:12)
    at AppContext.applyUserPlugins (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/prepare/AppContext.js:176:8)
    at AppContext.process (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/prepare/AppContext.js:102:10)
    at prepare (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/prepare/index.js:17:20)
    at prepareServer (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/dev.js:28:32)
    at module.exports (/Users/taylor/vuepress-blog-test/node_modules/@vuepress/core/lib/dev.js:4:40)
    at args (/Users/taylor/vuepress-blog-test/node_modules/vuepress/lib/util.js:35:12)
    at CAC.cli.command.option.option.option.option.option.option.option.option.action (/Users/taylor/vuepress-blog-test/node_modules/vuepress/lib/registerCoreCommands.js:34:23)
    at CAC.runMatchedCommand (/Users/taylor/vuepress-blog-test/node_modules/cac/dist/index.js:787:38)
    at CAC.parse (/Users/taylor/vuepress-blog-test/node_modules/cac/dist/index.js:707:18)
    at CLI (/Users/taylor/vuepress-blog-test/node_modules/vuepress/lib/util.js:23:7)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Other relevant information

  • Your OS: macOS High Sierra
  • Node.js version: v11.9.0
  • Browser version: n/a
  • Is this a global or local install? local
  • Which package manager did you use for the install? Yarn
  • Does this issue occur when all plugins are disabled? No (the bug seems to be with the plugin)

Metadata

Metadata

Assignees

No one assigned

    Labels

    has PRHas a related PRtopic: pluginsRelates to VuePress plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions