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

FATAL No build files found in /var/task/.nuxt/dist/server. #765

Open
silverbackdan opened this issue Dec 6, 2022 · 4 comments
Open

FATAL No build files found in /var/task/.nuxt/dist/server. #765

silverbackdan opened this issue Dec 6, 2022 · 4 comments

Comments

@silverbackdan
Copy link

silverbackdan commented Dec 6, 2022

Deploying a previously built Nuxt 2 app again results in

FATAL  No build files found in /var/task/.nuxt/dist/server.

Is there a config option that means we are building for Nuxt 2?
It's an assumption that it's Nuxt 3 release related...

Edit:
I should add that before I did not need to specify some modules as buildModules, but after re-deploying with no changes I needed to move a couple of modules in my Nuxt config. There have been no changes to my Nuxt 2 app before it re-deployed, it was just an automated process when I was deploying a separate API and it worked 27 days ago.

Edit 2:
Works fine by specifying 0.23.0 as the builder version. If Nuxt 2 will no longer be supported I guess it'd be nice to add to readme.

Copy link
Member

(This builder is only for Nuxt 2.)

Would you provide a reproduction?

@silverbackdan
Copy link
Author

silverbackdan commented Dec 7, 2022

OK great, in that case I literally deployed this same application and it is working again in 0.23.0. It's a big application so I haven't been able to isolate the issue yet unfortunately. Hmm.. it's a private repo.

I'll have to try and work out a repro, might take me a while but this was the build that failed logs

ℹ Install dependencies took: 12497.772024 ms
18:45:35.833 | ----------------- Collect artifacts -----------------
18:45:47.696 | ℹ Collect artifacts took: 11855.903748 ms
18:45:56.642 | Build Completed in /vercel/output [4m]
18:46:11.927 | Generated build outputs:
18:46:11.927 | - Static files: 62
18:46:11.927 | - Serverless Functions: 1
18:46:11.927 | - Edge Functions: 0
18:46:11.927 | Serverless regions: San Francisco, USA
18:46:11.927 | Deployed outputs in 4s
18:46:12.865 | Build completed. Populating build cache...
18:46:13.061 | ----------------- Collect cache -----------------
18:46:28.255 | ℹ 140 files collected from .nuxt
18:46:49.210 | ℹ 43578 files collected from .vercel_cache
18:47:08.565 | ℹ 36596 files collected from node_modules_dev
18:47:25.146 | ℹ 14009 files collected from node_modules_prod
18:47:25.179

And a successful build with the previous version:

ℹ Install dependencies took: 12337.376846 ms
--
18:57:22.125 | ----------------- Collect artifacts -----------------
18:57:33.840 | ℹ Collect artifacts took: 11709.90158 ms
18:57:42.952 | Build Completed in /vercel/output [3m]
18:57:59.041 | Generated build outputs:
18:57:59.041 | - Static files: 176
18:57:59.041 | - Serverless Functions: 1
18:57:59.042 | - Edge Functions: 0
18:57:59.042 | Serverless regions: San Francisco, USA
18:57:59.042 | Deployed outputs in 4s
18:58:00.026 | Build completed. Populating build cache...
18:58:00.235 | ----------------- Collect cache -----------------
18:58:15.709 | ℹ 473 files collected from .nuxt
18:58:37.479 | ℹ 43578 files collected from .vercel_cache
18:58:57.525 | ℹ 36456 files collected from node_modules_dev
18:59:14.541 | ℹ 14009 files collected from node_modules_prod
18:59:14.684 | ℹ Collect cache took: 74448.104301 ms

I did move 2 dependencies to buildModules as they were dev dependencies and started triggering an error. Apart from that, nothing else changed. I understand this is not the most helpful issue to raise. I'm sorry for that and realistically with the amount of info I can provide at the moment, I doubt it's fixable.

Perhaps with this issue here if anyone else has the same issue they may be able to produce a reproduction or we could converse on what our commonalities are.

it does seem odd that serverless functions are reported as built but then no build files are found where they are expected when trying to run the application.

Due to a heavy workload and working pretty full-on with a new large Nuxt 3 module, it's hard to find the time to work on this legacy project. Sorry for that. Appreciate your reply.

@tommerkestijn
Copy link

Had exact the same issue since 0.24.0 without any change in the application. Moved back to 0.23.0 and it worked again.

"use": "@nuxtjs/[email protected]",

hashlash added a commit to HafizhLab/frontend that referenced this issue Dec 22, 2022
@hashlash
Copy link

"use": "@nuxtjs/[email protected]",

It works for me too

hashlash added a commit to HafizhLab/frontend that referenced this issue Dec 23, 2022
* Update conflicting dependencies

* Downgrade webpack to 4.x

* Downgrade vercel-builder

nuxt/vercel-builder#765 (comment)

* Fix lint

* Fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants