Next.JS API call returns spawn git ENOENT

As the title says I’m attempting to utilize simple-git in an API call once the git repo is attempted to initialized the spawn git ENOENT is raised. I also tried using Brewfile.netlify to insure that git was available to use.

const git = simpleGit().clean(CleanOptions.FORCE);
const init = await git.init();

Any help would be greatly appreciated thank you!

Based on your title, you seem to be using Git inside Next.js API routes. This is not supposed to work. These routes run on AWS Lambda which are short-lived containers. You won’t get Git access in that.