Auto deploy not cloning submodules recursively

Hello,

Netlify is not cloning my submodules recursively, it only happens when I manually deploy. Help?

Thank you.

Hey! Can you please share your Netlify URL, a deploy log, and a bit more about the problem you’re experiencing? Are there error messages in your build logs? Are require/imports failing? That’ll all help us help you debug :slight_smile:

Sorry for the late reply I was just too lazy to setup the test repo :frowning: (or didn’t have time)

there you go: https://epic-haibt-aab42b.netlify.app/

4:04:39 PM: Build ready to start
4:04:41 PM: build-image version: 6dfe19d15f524c85d6f9bf7df9fb30b0a9f0a61a
4:04:41 PM: build-image tag: v3.3.10
4:04:41 PM: buildbot version: 0d19834c19ebfe54208907d729718495339fe085
4:04:42 PM: Fetching cached dependencies
4:04:42 PM: Failed to fetch cache, continuing with build
4:04:42 PM: Starting to prepare the repo for build
4:04:43 PM: No cached dependencies found. Cloning fresh repo
4:04:43 PM: git clone https://github.com/thoughtsunificator/netlify_test
4:04:43 PM: Preparing Git Reference refs/heads/master
4:04:46 PM: No build command found, continuing to publishing
4:04:46 PM: Starting to deploy site from ‘/’
4:04:46 PM: Creating deploy tree
4:04:47 PM: Creating deploy upload records
4:04:47 PM: 0 new files to upload
4:04:47 PM: 0 new functions to upload
4:04:47 PM: Starting post processing
4:04:48 PM: Finished processing build request in 6.365523092s
4:04:48 PM: Post processing done
4:04:48 PM: Site is live

First it worked flawlessly now it’s refusing to init submodules on all my sites.

To me it looked like it was not cloning nested submodules.

Thanks for putting that together. I don’t see a build command on your site but I think you’d have to add something like:

git submodule update --init --recursive --depth=1 && BUILD_COMMAND

as your full build command here: Netlify App or in a netlify.toml

As far as I know, this has not been implemented by default. This looks like the open feature request if you want to track or chime in there:

That said, if it worked for you initially, it seems like it could work again if you manually clear cache with each deploy. But probably best to script it :slight_smile:

1 Like

Hello Jen,

Didn’t know we could do that. I’ll try it for sure.

Thanks, have a good day/night.

1 Like