question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Error parsing triggers: Cannot find module 'example'

See original GitHub issue

I have an issue at the stage of deployment, I can only share portion of the code. I have setup some global paths in the tsconfig.json like this

        "baseUrl": "./",
        "paths": {
            "example": [
                "example/path"
            ]
        },

and then added these to the tslint.json not for implicit module dependency like this


        "no-implicit-dependencies": [
            true,
            [
                "example",
                "example/index",
                "example/undefined",
            ]
        ],

when running firebase deploy it start compiling then when almost ready to deploy im getting this error

+  functions: Finished running predeploy script.
i  functions: ensuring necessary APIs are enabled...
+  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...

Error: Error parsing triggers: Cannot find module 'example'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
thechenkycommented, Dec 18, 2018

@inmogr I would suggest using import and export, that should resolve the errors you’re seeing. In the stackoverflow post you linked, looks like using incompatible require/export statements is what is causing the module not to be found. As the post alludes, this is not a functions SDK issue but a matter of correct nodejs usage.

0reactions
inmogrcommented, Dec 19, 2018

here is the error im getting on this repo (https://github.com/inmogr/sample-error-fire-funcs)

> tsc

+  functions: Finished running predeploy script.
i  functions: ensuring necessary APIs are enabled...
!  functions: missing necessary APIs. Enabling now...
+  functions: all necessary APIs are enabled
i  functions: preparing functions directory for uploading...

Error: Error parsing triggers: Cannot find module '@example'

Try running "npm install" in your functions directory before deploying.

Having trouble? Try firebase deploy --help
Read more comments on GitHub >

github_iconTop Results From Across the Web

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 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 >
When deploying a function to Firebase using ... - Medium
Fixing “Error parsing triggers: Cannot find module './logger'” in Firebase CLI. When deploying a function to Firebase using $ firebase deploy --only ...
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 >
Error parsing triggers: Cannot find module 'firebase-admin'
Can you reproduce this in a fresh directory with a hello world function? Wondering if it's a versioning/npm issue or something in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found