I can't deploy the site

Hi,
When I deploy the site I goth this error

" Netlify says: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 "

Why I got this?
How can I fix this?

Reagrds

I’m assuming you’re talking about the mobile-reviews website. If yes, your error is similar to this: sourcebit-nextjs-cache.json Not Found · Issue #7 · stackbit/sourcebit-target-next · GitHub

I would try getting more details about what stage failed.

I usually add ’ --verbose’ to the end of my start script in the package.json file. I just ran into something like this when publishing and was able to troubleshoot locally using the [dev] option in the netlify.toml file to test and debug my start script.

It should tell you what stage failed so you can look into the issue further.

1 Like