Netlify can't detect builds created by turborepo

Hello, I use Netlify to deploy several websites from the monorepo managed by turborepo.

Websites are based on nuxt static generation.

During website generation, I need to also build a vue library, which is dependency for the websites. For that, I have configured turborepo pipeline to build this library before website generation starts. Locally the following command works completely fine:

turbo run generate --filter=website.com

However, if I use this build command in netlify, a build process will also run fine, but the deploy will contain 0 files.

I thought, that netlify grabs files a little earlier than needed, but the following build script didn’t help neither:

turbo run generate --filter=website.com && sleep 5

So currently I need to use the following script for all my repos in the monorepo:

npm run build --workspace=my-vue-lib && npm run generate --workspace=website.com

It’s frustrating, but at least my websites are deployed correctly.

what is the name of your site?

Hello, sorry for the late response. I’m not sure if it will be helpful, as build script is specified in the netlify.
My websites:

  • d0rich-me.netlify.app
  • design-d0rich-me.netlify.app
  • d0xigen-d0rich-me.netlify.app
  • dog-d0rich-me.netlify.app

Your websites appear to be working fine. Have you resolved the issue?

As stated in the description, I am currently using a workaround: instead of using turborepo commands, I use a sequence of npm scripts calls with the same effect.
At the moment, management of these sequences becomes annoying, and I can easily imagine a situation when it is crucial to use turborepo.

I’ve just rechecked it:

  • Website build using turborepo command and empty publish directory - Netlify
  • Build using a sequence of npm scripts with a correct publish directory - Netlify

It seems like Netlify doesn’t include gitignored files to deploy, so I can’t check for sure which artifacts were generated.

Your publish directory seems to be wrong: Deploy details | Deploys | dog-d0rich-me | Netlify. When you use Turborepo, do you also change your publish path?

Right, this time I just hoped to check if there are valuable artifacts in other folders.

Here is a deployment with a correct folder configuration, completely empty: Netlify

Do you get the same behaviour with apps/dog.d0rich.me/.output/public as the publish directory?

As I remember, I also tried this path and the behavior is the same. Nuxt.js by default generates artifacts in both dist and .output/static. Dist is working directory for all my nuxt-based projects and it works fine with npm scripts on Netlify and with everything anywhere else.

Setting .output/public worked for me: Deploy details | Deploys | f-131225 | Netlify. There might be some issue reading the dist symlink that gets generated, but .output/public works fine.

Worked for as well this time. Perhaps, last time, I didn’t check it properly.

To summarize the issue:

  • nuxt generates main output in .output/public and creates a symlink to it in dist
  • turborepo somehow makes this symlink unreadable

UPD: tried to remove dist from outputs in turborepo pipeline config, it didn’t help to publish from dist

Yeah for some reason the symlink is not working as expected. I’m checking with the devs if it’s something on us or not.