firebase deploy --only functions without node_modules
See original GitHub issueFrom the docs I concluded that it’s not necessary to have local pckgs in node_modules installed for GCS to operate: it should install them in the instance based on package.json. So, I deleted node_modules coz it seemed that it uploads and takes some time to do that. However I get an err. Anyone else has this?
i deploying functions
i functions: ensuring necessary APIs are enabled...
i runtimeconfig: ensuring necessary APIs are enabled...
+ runtimeconfig: all necessary APIs are enabled
+ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error parsing triggers: Cannot find module 'firebase-functions'
Try running "npm install" in your functions directory before deploying.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Manage functions | Cloud Functions for Firebase - Google
Deploy functions. To deploy functions, run this Firebase CLI command: firebase deploy --only ...
Read more >How to deploy some functions to Cloud Functions for Firebase ...
There is currently no way to deploy a single function with the Firebase CLI. Running `firebase deploy` will deploy all functions. We've recently ......
Read more >When Your Firebase Cloud Functions Don't Want to Deploy ...
Why were the build error details not available? I'll never… ... You have 2 free member-only stories left this month. ... firebase deploy...
Read more >[2022][Solved] Conflicting peer dependency: firebase ...
firebase deploy --only functions ... npm ERR! Could not resolve dependency: ... npm ERR! node_modules/firebase-functions-test
Read more >Firebase functions cannot find module express
Assuming there are no other libraries, frameworks or custom module loaders ... I went into functions and ran npm install --save firebase and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @jjhesk , run the following inside of your functions directory:
I ran into this and struggled with it for a bit so just to add some help to others that might run across this and not see the obvious answer.
If you’re using some kind of automated pipeline then you will likely need to specifically add the
cd functions && npm install && cd -
to the runner. Below is an example.gitlab-ci.yml
that I use for for a gitlab polymer project.I think I got hung up on this because I didn’t have to do that step locally when I first setup the project. Likely
firebase init
just did it for me.