Support Forums

Functions directory not relative to repo root

According to the Netlify Functions docs, the functions directory (as specified in the Netlify Console or netlify.toml) should be relative to the repo root:

“The path is relative to the root of the repository , and is accessed by Netlify after running your build command.”

Taken from:

However, when deploying my site and specifying a base path in my netlify.toml file, it seems like the functions directory is actually being set relative to the specified base directory, not the root directory.

Is this the intended behavior?

Hey @philiplindberg,
You’re absolutely right: when setting a base path, the functions directory is relative to that base directory! We’ll let the Docs team know and will report back here when we’ve either updated our docs or come to some other decision. Thanks for pointing this out.

1 Like

Hey @philiplindberg, we updated our docs! Here (Definitions > Base directory) and here (" The path is relative to the site’s base directory in your repository.")

Thanks again for flagging this.

Thanks for following up!