I was running into this issue. Various dependencies were causing my function deployment to fail. After a bit of digging I found that the peer-dependencies were not being included.
Adding this fixed my issue
"scripts": {
...
"gcp-build": "npm i npm-install-peers"
},
[checking the docs][1].
the `gcp-build` command allows us to perform a custom build step during the function build process.
[1]: https://cloud.google.com/functions/docs/writing/specifying-dependencies-nodejs
I was running into this issue. Various dependencies were causing my function deployment to fail. After a bit of digging I found that the peer-dependencies were not being included.
Adding this fixed my issue
"scripts": {
...
"gcp-build": "npm i npm-install-peers"
},
[checking the docs][1].
the `gcp-build` command allows us to perform a custom build step during the function build process.
[1]: https://cloud.google.com/functions/docs/writing/specifying-dependencies-nodejs