Skip to content
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

Build gets stuck after success #580

Closed
MartinMuzatko opened this issue Jun 13, 2018 · 9 comments
Closed

Build gets stuck after success #580

MartinMuzatko opened this issue Jun 13, 2018 · 9 comments
Labels
type: bug Something isn't working

Comments

@MartinMuzatko
Copy link
Contributor

MartinMuzatko commented Jun 13, 2018

Bug report

Version

Tested with 9.1 and 10.1

Steps to reproduce

vuepress build

This happens ONLY in this repository: git@gitlab.com:MartinMuzatko/wire-up-your-front-ends.git or download from here: https://gitlab.com/MartinMuzatko/wire-up-your-front-ends

My other vuepress project builds fine, but since this project is based off of previous projects I don't see any problem..

What is expected?

command finishes

What is actually happening?

command never finishes and is stuck at "Success! Generated static files "

I never get returned to the CLI prompt
image

This wouldn't be that drastic, if CI systems don't need the command to finish in order to publish.

Other relevant information

  • Your OS: Windows 10 (but the build also gets stuck on netlify)
  • Node.js version: 8.9.x
  • Is this a global or local install? both, tried via package.json and global
  • Which package manager did you use for the install? npm
@ulivz
Copy link
Member

ulivz commented Jun 13, 2018

Oh, reproduced!

@ulivz ulivz added the type: bug Something isn't working label Jun 13, 2018
@ulivz ulivz closed this as completed in be726e1 Jun 13, 2018
@ulivz
Copy link
Member

ulivz commented Jun 13, 2018

Thanks, fixed at: fa473a7

ulivz added a commit that referenced this issue Jun 13, 2018
@MartinMuzatko
Copy link
Contributor Author

MartinMuzatko commented Jun 13, 2018

I'm trying to strip it down and reduce what is necessary.
It looks like the problem was with the setInterval in DataFuel.vue.

Thanks a lot for the quick fix!

@ulivz
Copy link
Member

ulivz commented Jun 13, 2018

@MartinMuzatko

In fact, I think we should avoid introducing process.exit in code, but this is the second time someone has encountered this problem, so I just solved it like this. I also think that this should be a problem with userland's code.

If you can find the root cause, please tell me, thank you!

@MartinMuzatko
Copy link
Contributor Author

MartinMuzatko commented Jun 13, 2018

When removing setInterval within created method, the build ends fine without process.exit. To me it looks like Vue SSR tries to wait for anything that it could prepare. But then the build process should get stuck somewhere else.

@MartinMuzatko
Copy link
Contributor Author

MartinMuzatko commented Jun 13, 2018

@ulivz I also fixed it by moving the setInterval functions to the mounted function :) so yes - my assumption should be correct

ulivz added a commit that referenced this issue Jun 13, 2018
@ulivz
Copy link
Member

ulivz commented Jun 13, 2018

Thanks, I just reverted the fix.

@MartinMuzatko
Copy link
Contributor Author

@ulivz is this something that Vue SSR should deal with? Or is this just common practice that timeouts/intervals should be avoided in created?

@ulivz
Copy link
Member

ulivz commented Jun 13, 2018

created hook will be executed at both client and Node side, while mounted hook is client only.

And blocking exit when using setInterval isn't Vue but the Node's behavior.

For more information, you can try to understand the Event Loop of Node.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants