hanbyul-here/nuxt-incremental-build-exp

Error: no such file or directory '/opt/build/repo/.nuxt/dist/client'

Opened this issue · 1 comments

First of all: Great Work :) I'm really wondering why incremental builds aren't part of core nuxtjs yet.

I tried your code (with nuxt 2.14.) and everything works fine in local development. However, if I want to deploy it on Netlifiy, this error occurs:

✖ Nuxt Fatal Error    
  Error: ENOENT: no such file or directory, stat 
  '/opt/build/repo/.nuxt/dist/client' 

Any idea, how to solve this? Thanks in advance.

Hi, I am not sure this issue is still relevant to you. Apologies that I am getting back to you so late. This repo was mainly set up to prove the concept, so I didn't really pay attention to this repo after first set up.

Your error looks like the one described in README. As far as I remember, --no-build option works only when there is already a previous build, and the error indicates that there is no previous build. I ran the first few builds without --no-build option, then changed the command by editing netlify build command to work around this problem.

I didn't run any build for a while. I just realized that the build command doesn't work anymore. I assume it is because Netlify doesn't keep cache folder that long? Anyway, I edited the script to check if the cache folder is there and run the build command accordingly, so I believe it should not throw the error anymore.