No Functions were found in netlify/functions directory

Site URL: https://inspiring-sundae-473bd0.netlify.app/

I’ve been trying to get my Netlify Functions to deploy with my build but they are not detected. My GitHub repo has a folder named netlify and another folder inside that named functions where I put my checkout.go file. On the build log it says no functions were found.

Can someone help me out? I must be missing something.

Hey @pure

Can you share the repository?

Hi, thanks for the quick response. The repo is private, can you send me a Github username or email so I can add you?

I can also send a screenshot of the folder structure or send any code.

Thanks

The site shows a Page Not Found so I wonder about the directory structure of the project and what build settings you are using. Are you deploying something other than functions? Does everything exist at the root of the repository or is it in a sub-directory?

Yeah I am deploying a Gatsby site and everything works as expected. Just no index. Only thing is the functions are not detected. Can I add you to the repo so you can see for yourself?

Actually see below.

What are the build settings in the Netlify UI?

Build Settings:

Function Build Settings: ( I tried setting that to Pure Checkout but it didn’t detect any functions then either.)

Lastly, the logs pertaining to functions from last build:

8:42:13 PM: Parsing package.json dependencies

8:42:14 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: ‘netlify/functions’ versus ‘’ in the Netlify UI

8:42:14 PM: Starting build script

8:42:51 PM: ────────────────────────────────────────────────────────────────
8:42:51 PM: 4. Functions bundling
8:42:51 PM: ────────────────────────────────────────────────────────────────
8:42:51 PM: ​
8:42:51 PM: Packaging Functions from .netlify/functions-internal directory:
8:42:51 PM: - __api/__api.js
8:42:51 PM: - __dsg/__dsg.js
8:42:51 PM: - __ssr/__ssr.js
8:42:51 PM: No Functions were found in netlify/functions directory
8:42:51 PM: ​
8:42:53 PM: ​
8:42:53 PM: (Functions bundling completed in 1.5s)

Thoughts? Not sure where to go from here.

Gatsby, with the Netlify plugin, isn’t my strong point. But without seeing the repository and possibly testing it, I’m at a loss. I have flagged this for Netlify Support as they may have more insights than I do.

Could you try if moving the functions to a different folder help by any chance?

Hi, I did that before eventually removing any config and creating the “netlify/functions” folder structure but that didn’t work either as you can see.

Can I get your email or github so I can add you to the repo? I can also send over a zip of exactly whats being deployed.

Thanks

@hrishikesh Can you let me know who to share the repo/export with?

Thanks

Hey @pure,

You could add Hrishikesh-K on GitHub.

Thanks for your response. I sent you an invite.

Hi @pure,

I was able to get the Functions detected by moving checkout.go, go.sum and go.mod into a folder named checkout inside netlify/functions. I also renamed checkout.go to main.go.

There is still a build error which says:

go: github.com/aws/aws-lambda-go@v1.31.1 requires
  github.com/stretchr/testify@v1.6.1: missing go.sum entry; to add it:
  go mod download github.com/stretchr/testify

which I believe you can solve.

Thank you so much, I’ll try that now.