Closed f-elix closed 4 years ago
@f-elix You might want to try https://community.netlify.com first. That's their support community. Also, can you link to the repo that's causing you trouble?
Sure, here you go: https://github.com/f-elix/eleventy-starter
I'll ask in the Netlify forum and will let you know if I find anything.
I got no answer on the Netlify community forum, but I was able to deploy the repo successfully on Vercel, with all the build events getting called.
I'm closing this issue as this is clearly an issue with Netlify.
Thanks!
UPDATE:
I found out what the problem was with Netlify.
I was setting the NODE_ENV variable to 'production' in my site settings. As per Netlify's docs, when that's the case, Netlify won't install the devDependencies during the build process (why that is, I cannot understand). Since Eleventy was in my devDependencies (among other things), nothing was being built with my actual setup.
Describe the bug I use the build events beforeBuild and afterBuild in my pipeline to process my assets, and they are working great when I run a local build, but they are not getting fired when the command is run by Netlify.
I inserted console logs at several steps to keep track of the build process. I can see the messages printed on my local console but can't see any in the Netlify deploy logs. Moreover, my assets are dependant on the code that runs in those events to be inserted in the final build folder, and they are not in said folder once Netlify is done.
To Reproduce Steps to reproduce the behavior:
Expected behavior The events should be run both locally and on Netlify.
Environment: