Home
Support Forums

Uploading next js functions

Preview deploy available https://610e68fb14cf62ea89b6b27c–goofy-hodgkin-051af1.netlify.app/register and the logs

Deploy path:        /home/coel/projects/airbnb-clone/packages/web/out
Functions path:     /home/coel/projects/airbnb-clone/packages/web/out_functions
Configuration path: /home/coel/projects/airbnb-clone/netlify.toml
Deploying to draft URL...
✔ Deploying functions from cache (use --skip-functions-cache to override)
✔ Finished hashing 22 files and 4 functions
✔ CDN requesting 2 files and 4 functions
✔ Finished uploading 6 assets
✔ Deploy is live!

Logs:              https://app.netlify.com/sites/goofy-hodgkin-051af1/deploys/610e68fb14cf62ea89b6b27c
Website Draft URL: https://610e68fb14cf62ea89b6b27c--goofy-hodgkin-051af1.netlify.app

If everything looks good on your draft URL, deploy it to your main site URL with the --prod flag.
netlify deploy --build --prod

Yeah,it’s working on your pc.

Are you using latest code ?

My problem is i can’t upload functions,netlify giving me 500 Internal server error

I ran the following

$ git clone https://github.com/alisalim17/airbnb-clone
$ yarn install
$ npm run build
$ ntl deploy --build

It deployed without issue. However the following error are logged in DevTools when attempting to register

airbnb-clone-errors

Have you tried removing .next, out, out_functions and .netlify directories before building?

Yeah,it’s normal i didn’t deployed my backend

I am trying now,

I will remove those folders and run netlify deploy --build.Is it right ?

Btw my netlify-cli version:
ntl -v
netlify-cli/6.0.8 win32-x64 node-v14.17.1


What is yours ?

Just updated to the latest (though I don’t believe that should matter.)

I tried what you said,removed .next, out, out_functions and .netlify.

Then i run netlify init,i created project and netlify starting build code,then it started deploying it.

At the end it’s giving me this error :

⠦ (5/6) Uploading next_register… » Warning: JSONHTTPError: 500
» Warning:
» {
» “name”: “JSONHTTPError”,
» “status”: 500,
» “json”: {
» “status”: 500,
» “error”: “Internal Server Error”
» }
» }
»


What you think ? When netlify giving that error ??

Perhaps your bundled function (`.netlify/functions/next_register.zip) is too big as per 500 Internal Server Error on "CDN Diffing Files" - #23 by luke

1 Like

My functions dir is different(packages/web/out_functions).‘out_functions’ size is about 9 mb.I think that’s not big at all.

Netlify also creates another functions as you said(.netlify/functions) and that folder’s size is 50 mb.

How can i reduce size of out_functions ?

Finally,i solve the issue using by github actions.

I think the problem with my pc.

Thanks for your help.

I really appreciate it :slight_smile: