question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blog Plugin broken

See original GitHub issue
  • 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)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Qymhcommented, Mar 2, 2019

there is a way to resolve the problem quickly but not completely solve the problem. To change node_modules/@vuepress/core/lib/plugin-api/index.js.Change the 84 line from let plugin to let plugin = {}

1reaction
Frank-commented, Mar 6, 2019

If this is useful to anyone running in to this issue. I fixed this problem for now by changing Line 4 in node_modules/@vuepress/plugin-blog/index.js from const { layoutComponentMap } = ctx to const { layoutComponentMap } = ctx.themeAPI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to quickly fix a WordPress blog that was broken by ...
Rick explains how to quickly fix a WordPress blog that was broken by installing (or updating) a 'bad' plugin.
Read more >
WordPress Site Broken After an Update? Here's How to Fix It
1. A WordPress core, theme, or plugin update fails · 2. There's a white screen of death · 3. The site doesn't work...
Read more >
A Plugin Broke Your WordPress Blog? Here Is What To Do
1. Try to de-activate the plugin. The first thing you should try is to de-activate the plugin. · 2. Rename the plugin via...
Read more >
A WordPress Update Broke My Site: How Do I Fix It Safely?
Did an update to your WordPress theme, plugin or core files break your site? Learn about the possible reasons why & how to...
Read more >
Plugins categorized as broken - WordPress.org
This plugin is designed to handle the broken characters that might appear on your blog… Kaloyan K. Tsvetkov 400+ active installations Tested with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found