-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed to resolved async component #1729
Comments
Sorry, I have a similar issue. Inside an Existing Vue Project
module.exports = {
title: 'Hello VuePress',
description: 'Just playing around',
configureWebpack: config => {
},
chainWebpack: (config, isServer) => {
// console.log(config);
// config is an instance of ChainableConfig
},
}
"scripts": {
"docs:dev": "vuepress dev src/pages/sitemap",
"docs:build": "vuepress build src/pages/sitemap"
}, # DOCUMENT What is actually happening?
Other relevant information
|
This looks like maybe a problem introduced by
|
i will try to find the error in 1.0.3 next week i cant till there because coming to Canada ^^ |
I removed node_modules and global vuepress installation, then ran npm install in the project folder and this solved the issue. |
i dont understand how it can solve the problem to do that. I dont have vuepress global install. And npm install will install the exact same packages |
I'd like to add that I also encountered this error. At first I thought it had to do with an async promise in my custom component (in this case it was a cognito login popup) but after troubleshooting for a while I found that the issue only came up when I ran a build.
Diving deeper into the error messaging I found that it wasn't a problem with async code in the component, but rather that my component referenced "window" in it's environment detection logic. Window isn't available when your code is building - thats a browser thing. Hopefully this helps you figure out the issue. |
This means, depending on your component usage, you may need to use the However, this doesn't precisely explain why it happens in |
@blindedbymscience you faced the same issue but it was about window after you investigate ? I am not sure i understand here ^^. I will check if i can have more infos in my day off this weekend observation 1: The intersting fact here is i cloned vuepress and link it to my project and it's working... npm problem maybe. Because the project is using yarn for boostrap etc observation 2: Not an npm problem same project with yarn install same problem but the link work |
@f3ltron In my case, the build was failing while running on AWS CodeBuild -in that Node environment there was no "window" object so that component was throwing errors while the build was running. As soon as I removed the call in my code to window the build ran fine. |
ok this is not relevant to this bug so |
I am facing the same issue, however, in my case, I am defining a custom plugin. Everything compiles fine if I use a |
Same issue. Clean install into a clean project. V1.0.3. |
i will try to revert the thing in the #1708 |
I have the same problem, and rolling back to 1.0.2 doesn't work. |
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
What is expected?
it should just work when we run the doc
What is actually happening?
Other relevant information
npx vuepress info
in my VuePress project:The text was updated successfully, but these errors were encountered: