@leemartin @Netlify Exactly.
Each function folder can have its own package.json which is nice.
While I gitignore the node_modules of my site build (depending on your build, of course), I include the node_modules of the functions after installing them as you describe. The deploy runs smoothly then.