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.

failed to resolved async component

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14

github_iconTop GitHub Comments

4reactions
Luludacommented, Aug 19, 2019

This looks like maybe a problem introduced by 1.0.3… I was experiencing the same problem and rolled back to 1.0.2 and I no longer receive that error.

Environment Info:

  System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
  Binaries:
    Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
    Yarn: 1.16.0 - ~/.yarn/bin/yarn
    npm: 6.10.2 - ~/.nvm/versions/node/v10.16.0/bin/npm
  Browsers:
    Chrome: 75.0.3770.142
    Firefox: 64.0
    Safari: 12.1.2
  npmPackages:
    @vuepress/core:  1.0.2 
    @vuepress/theme-default:  1.0.2 
    vuepress: 1.0.2 => 1.0.2 
  npmGlobalPackages:
    vuepress: Not Found

I have the same problem, and rolling back to 1.0.2 doesn’t work. System: OS: macOS 10.14.3 Binaries: Node: 10.12.0 Yarn: 1.15.2 npm: 6.5.0 Browsers: Chrome: 75.0.3770.100 npmPackages: vuepress: 1.0.2 npmGlobalPackages: vuepress: Not Found

1reaction
jsbaguettecommented, Jul 31, 2019

i will try to find the error in 1.0.3 next week i cant till there because coming to Canada ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic imported vue component failed to resolve
The root cause is import() is async (it returns a Promise) which the error you got already told you: [Vue warn]: Failed to...
Read more >
Error with Vue lazy loading components: "Failed to resolve ...
When using Vue async components, and building my application in development mode ( run dev or run watch ) I receive the following...
Read more >
Async Component loading not working - Get Help - Vue Forum
Im trying to lazyload some of the components and getting the following error: [Vue warn]: Failed to resolve async component: ()=>t.e(6).then(t.bind(null,126))
Read more >
Code Splitting - Failed to resolve async component - Laracasts
Code Splitting - Failed to resolve async component: function () etc. I'm having an intermittent problem - I think this is due to...
Read more >
Failed to resolve async component render with view-router ...
Coding example for the question Failed to resolve async component render with view-router-Vue.js.
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