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.

Cannot read property 'match' of undefined

See original GitHub issue

Related issues

the issue does not solve my problem

[REQUIRED] Version info

{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "serve": "firebase serve --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "dependencies": {
    "firebase-admin": "~6.0.0",
    "firebase-functions": "^2.1.0",
    "node-fetch": "^2.3.0"
  },
  "private": true
}

node: 6.0

firebase-functions: .onWrite

[REQUIRED] Expected behavior

call .onwrite and tell me data updated or not

[REQUIRED] Actual behavior

TypeError: Cannot read property ‘match’ of undefined at resourceToInstanceAndPath (/user_code/node_modules/firebase-functions/lib/providers/database.js:170:25) at RefBuilder.changeConstructor (/user_code/node_modules/firebase-functions/lib/providers/database.js:117:38) at cloudFunctionNewSignature (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:104:28) at cloudFunction (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:135:20) at /var/tmp/worker/worker.js:779:24 at process._tickDomainCallback (internal/process/next_tick.js:135:7)

Were you able to successfully deploy your functions?

Yea

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
Radzellcommented, Jul 8, 2019

How do you fix this issue if you are already using Node 8?

1reaction
tbone849commented, Nov 11, 2019

I updated all firebase packages to their latest versions and that cleared up my problem. I had a pretty out-of-date firebase-admin package that I believe was the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack: Cannot read property 'match' of undefined
Simple answer just run rm -rf package-lock.json.
Read more >
NPM - Cannot read property "match" of undefined
While not a root-cause solution, a workaround is: Delete node_modules and package-lock. json.
Read more >
Cannot read property .match of undefined - Heroku Help
This is a known version bug in NPM. Right now, the best way to resolve is to regenerate the package-lock.json until there is...
Read more >
[BUG] npm ERR! Cannot read property 'match' of undefined
The root cause and the fix for this issue, is probably during npm i it should do a check on the generated package-lock....
Read more >
npm err! cannot read property 'match' of undefined - You.com
The root cause and the fix for this issue, is probably during npm i it should do a check on the generated package-lock.json...
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