-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Don't delete .next
folder before a replacement is built
#1139
Conversation
Brilliant. Atomicity ftw |
*.sublime-* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed this. I don't think we should have an editors section. gitignore
is for artifacts of the project itself, not user systems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed it myself, sorry. But I don't think I added that line? Must have been EOL.
Thanks, @rauchg! |
I think the build folder should be created in temp dir otherwise it remains when build failed. |
Not sure that's a bad thing because people can check for exit code and
clean up if necessary ?
On Tue, Feb 14, 2017 at 8:36 PM Naoyuki Kanezawa ***@***.***> wrote:
I think the build folder should be created in temp dir otherwise it
remains when build failed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8SZAxLy9Tvf-JiMm6jdQe8GW2HHeks5rcjpqgaJpZM4MBG6A>
.
|
I dont know when you want to keep failed |
"Post-mortem" analysis of the failed build perhaps
On Tue, Feb 14, 2017 at 8:42 PM Naoyuki Kanezawa ***@***.***> wrote:
I dont know when you want to keep failed .next-xxx on your app folder.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8QEWdBoQ8_ZhjV8HE8WX-CmAmsPQks5rcjv0gaJpZM4MBG6A>
.
|
Possibly. though I think we can print the path when failed instead since you have no idea what |
Good point. Let's print path if it fails
On Tue, Feb 14, 2017 at 8:53 PM Naoyuki Kanezawa ***@***.***> wrote:
Possibly, though I think we can print the path when failed instead since
you have no idea what .next-xxx is anyway. I just want to make sure it
doesnt remain when I cancelled the build.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8T_qlmRL5FK9LpVynnZjkEXwoRp1ks5rcj5ogaJpZM4MBG6A>
.
|
Solves #1135.
On build, sequentially:
.next
as is.next-6c15581c-e852-...
.next
to a random.next-5c523d99-4375-...
.next-6c15581c-e852-...
to.next
, efficiently replacing the current state.next-5c523d99-4375-...
next.js
process)On deploy (using eg.
pm2
), this led my current app to have, a total down time of virtually nothing, instead of being down for several minutes.The problem was, in the current state of
next.js
, that the entire.next
directory suddenly disappeared when mynext.js
process was still running and using the files in it, which made it crash and displayInternal Server Error
(the_error.js
disappeared, too...).With this solution, there's virtually no down time when deploying.