netlify-plugin-gatsby icon indicating copy to clipboard operation
netlify-plugin-gatsby copied to clipboard

Gatsby 4 functions not working when building from cli

Open laurenskling opened this issue 2 years ago • 3 comments

I am expirimenting with Gatsby 4 for my site https://autokopenduitsland.netlify.app/ using @netlify/[email protected] 3 functions are added, for example for DSG.

When using the Netlify builders, I got everything working. DSG functions render my defer-ed pages and I can see logging in the DSG function.

But when building from another source, for example using netlify-cli locally and using netlify build and netlify deploy, the Functions are added, but they do not seem to work. Nothing happens in the logs and I get 404s.

Built from Netlify services: https://6164218fb2b760e7633aae59--autokopenduitsland.netlify.app/een-auto-importeren-uit-duitsland Built and deployed from local machine using netlify-cli: https://6164208c6ff98275dadbf5b9--autokopenduitsland.netlify.app/een-auto-importeren-uit-duitsland

Is it redirect rules? The UI gives me: 2 redirect rules processed vs 1 redirect rule processed manually adding redirect rule /* /.netlify/functions/__dsg 200 makes the page error ENOENT: no such file or directory, lstat '/var/task/.cache/data'": https://61642c784e749892dcf79988--autokopenduitsland.netlify.app/een-auto-importeren-uit-duitsland

laurenskling avatar Oct 28 '21 09:10 laurenskling

Can you try doing netlify deploy --build rather than seperate steps?

ascorbic avatar Nov 01 '21 10:11 ascorbic

This doesn't seem to go very well either: https://619111bda48bb67f795b6e2e--autokopenduitsland.netlify.app/een-auto-importeren-uit-duitsland

laurenskling avatar Nov 15 '21 07:11 laurenskling

@laurenskling, the plugin has had several updates since you last commented, is this still an issue for you?

nickytonline avatar Jun 27 '22 19:06 nickytonline

Closing due to inactivity, but if this is still an issue though feel free to reopen it

ericapisani avatar Oct 12 '22 15:10 ericapisani

Sorry for not responding before. I hadn't tried building this site with Gatsby functions anymore, so I cannot give you any test results anymore. Thanks for your time.

laurenskling avatar Oct 17 '22 11:10 laurenskling