Default setting for deploy in netlify not working

The documentation in tutorial 4:deploy say

Now just authorize Netlify to connect to your git hosting provider and find your repo. When the deploy settings come up you can leave everything as the defaults and click Deploy site.

This is the default deploy setting after selecting the project from my github

Build settings

Runtime
Not set

Base directory
api

Package directory
api/api

Build command
yarn rw deploy netlify

Publish directory
api/…/…/web/dist

Build status

Active

But that not work, here is the output

(build.command completed in 21.4s)
12:05:08 AM: ​
12:05:08 AM: Functions bundling
12:05:08 AM: ────────────────────────────────────────────────────────────────
12:05:08 AM: ​
12:05:08 AM: The Netlify Functions setting targets a non-existing directory: api/dist/functions
12:05:08 AM: ​
12:05:08 AM: (Functions bundling completed in 1ms)
12:05:08 AM: ​
12:05:10 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
12:05:10 AM: Failing build: Failed to build site
12:05:11 AM: Finished processing build request in 56.182s

Deleting the default value for build setting make it work

Build settings

Runtime
Not set

Base directory
/

Package directory
Not set

Build command
Not set

Publish directory
Not set

Build status

Active

Thank you!

Unknown to us, Netlify recently broke the “redwood project” auto discovery. We are working with them as of two days ago to get this fixed.

In the meantime, manual configuration (shown above) works just fine.

Note: this only affects new Netlify deployments.

1 Like