netlify-files-module icon indicating copy to clipboard operation
netlify-files-module copied to clipboard

Long running netlifyFiles causes nuxt generate to timeout

Open pelargir opened this issue 3 years ago • 0 comments

If the netlifyFiles function is using async/await to add dynamic config from an API and takes longer than 5 secs to do this, the nuxt generate process will timeout with the following error:

 ⚠ Nuxt Warning                                                                  
                                                                                 
 The command 'nuxt generate' finished but did not exit after 5s                  
 This is most likely not caused by a bug in Nuxt                                 
 Make sure to cleanup all timers and listeners you or your plugins/modules start.
 Nuxt will now force exit                                                        
                                                                                 
 DeprecationWarning: Starting with Nuxt version 3 this will be a fatal error     

I believe the solution involves passing in a callback from Nuxt so Nuxt knows something is still happening during async/await construction of the config. I'm not sure how to implement that, though.

pelargir avatar Mar 15 '21 12:03 pelargir