Error parsing triggers: Cannot find module './db.json'
See original GitHub issueI’m trying to add image-sharp so i can automatically generate thumbnails. I’ve ran npm install at the functions level and added the following modules:
const functions = require("firebase-functions");
const gcs = require("@google-cloud/storage")();
const path = require("path");
const sharp = require("sharp");
const _ = require("lodash");
const os = require("os");
When I run firebase deploy
I get this message at functions: preparing functions directory for uploading...
Error: Error parsing triggers: Cannot find module './db.json'
Try running "npm install" in your functions directory before deploying.
If i remove those new module dependencies from my index.js i don’t get the error.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Error parsing triggers Cannot find module when deploying ...
I am implementing a firebase function endpoint that requires I authenticate with two different projects. Information found on SO and other ...
Read more >Error parsing triggers: Cannot find module 'firebase-functions'
I got the idea from @laurenzlong to remove "functions" key but instead removed "firebase-functions" from package.json and "yarn build && ...
Read more >Error parsing triggers: Cannot find module 'firebase-admin'
I get the same error message when I do this in the project root directory and in the functions directory.
Read more >Error parsing triggers: Cannot find module 'firebase-functions'
Coding example for the question Error: Error parsing triggers: Cannot find module 'firebase-functions'-node.js.
Read more >react-most-wanted/Lobby - Gitter
Error: Error parsing triggers: Cannot find module 'firebase-function-tools' Require stack: - c:\workspace\2020\most-wanted\functions\index.js ...
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 FreeTop 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
Top GitHub Comments
@inlined - I think you’re code and dependencies are fine, it was dependency on my end (sharp@0.17.1) that wouldn’t install on GCF, once I upped my version of Sharp all was well.
Glad to hear you’re sorted out. We’ll look at updating the dependencies in the sample.