Skip to content

failed to resolved async component #1729

Closed
@flozero

Description

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

Bug report

Steps to reproduce

  • create a vue js project with vue create examples

  • adding --save-dev vuepress@next 1.0.0-rc.1

  • running "docs": "vuepress dev --no-clear-screen"

  • adding a config.js in .vuepress folder

const path = require('path');

module.exports = {
  title: 'VuePress Docgen',
  description: 'Preview your components',
  themeConfig: {
    nav: [
      { text: 'Home', link: '/' },
      { text: "Components Examples", link: "/components/" },
      { text: 'Github', link: 'https://github.com/f3ltron/vuepress-plugin-docgen' }
    ],
    sidebar: {},
  },
  base: "/vuepress-plugin-docgen/"
}
  • adding a readme at the root of the docs
---
home: true
tagline: Vuepress-plugin-docgen
actionText: Get Started →
features:
- title: Simplicity First
  details: Minimal setup to helps you focus on writing.
- title: Customisable
  details: All templates are customisables
- title: Easy to particpate
  details: Check the contributing guide and you dream <3 
footer: MIT Licensed | Copyright © 2019-f3ltron
---

What is expected?

it should just work when we run the doc

What is actually happening?

[Vue warn]: Failed to resolve async component: function Layout() {
    return __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! ./node_modules/@vuepress/theme-default/layouts/Layout.vue */ "./node_modules/@vuepress/theme-default/layouts/Layout.vue"));
  }
Reason: TypeError: Cannot assign to read only property 'exports' of object '#<Object>'

Other relevant information

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: macOS 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.10.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 75.0.3770.142
    Firefox: Not Found
    Safari: 12.1.2
  npmPackages:
    @vuepress/core:  1.0.3
    @vuepress/theme-default:  1.0.3
    vuepress: ^1.0.0-rc.1 => 1.0.3
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions