It’s intended to deploy what you have built locally. I can see however from this log line:
CDN requesting 0 files and 1 functions
…that there are no changes versus content we’ve seen before. Are you sure there are local changes within your deploy directory (note that there is no “building” step beyond what you’ve already done right before running netlify deploy, so maybe you just haven’t rebuilt since you made changes?)
As I explained, I can build and deploy locally with netlify dev, but neither netlify dev --prod nor netlify deploy appears to be working. The log line you see is probably me repeating the process, hoping for a magically different outcome
What I can do is make a small code change, deploy it locally, verify that the React page shows the correct markup, verify that the test button invokes the lambda, and show the lambda response of ‘okay’. Then show that the firestore database was actually updated by the lambda.
Then I can do a production deploy, and show that the outcome is different that what happens locally.
However, it is time for me to make dinner and I’ll have to get back with you. I really hope it is me that’s screwing up, but I’m starting to doubt my abilities in that department.
Okay, you pointed me in the right direction, Chris. I had executed a netlify functions:build but overlooked the react build. I was/am confused by the difference between netlify dev, netlify deploy, and the github auto-build.
Once I ran yarn build, then netlify deploy, everything worked okay. However, I am still getting the same error noted above during auto-deploy after check-in to github (missing apollo-server-lambda). I suspect there’s something amiss in my package.json file scripts. If I can’t get that resolved I’ll enter another ticket.
So netlify dev is “test changes locally before publishing or committing”, netlify deploy is “deploy local files”. The GitHub autobuild on the other hand only works with what is in github - so for your local dev cycle, you do something like "change file, check in netlify dev, deploy with netlify deploy" you’d want us not to build when you ALSO commit to GH. But my pattern is more like:
Right, but the github workflow does not work, while the netlify deploy does. Same source code. Since the node_modules folder is typically excluded from repo check in, there’s going to be a difference in how those two flows are processed, if I understand correctly.
When I was using zip-it-and-ship-it, I had several function .js files in the functions folder, plus one node_modules folder. The utility would zip up each function into a zip archive, along with its node_modules dependencies (which, when zipped, would vary from function to function, even though they all shared one node_modules originally).
I’m going to try to fork my project, simplify it a bit, and if the results are the same, I’ll make it public so that you can reproduce it.
I’m having the same issue. I can only make my functions to work on production if I manually netlify deploy --prod. What are we missing? Isn’t the Netlify (github triggered or build-hooks triggered) deploy meant to take charge of that?