Firebase-admin-node: Firestore access via Firebase-admin crashes due to nanomatch/micromatch property error

Created on 27 Jun 2018  路  10Comments  路  Source: firebase/firebase-admin-node

All calls to firestore via firebase-admin sdk fail with the following reason:-

TypeError: Cannot read property 'addQmark' of undefined
at Object. (/user_code/node_modules/firebase-admin/node_modules/nanomatch/lib/compilers.js:92:15)
at Object.visit (/user_code/node_modules/firebase-admin/node_modules/snapdragon/lib/compiler.js:129:15)
at Object.mapVisit (/user_code/node_modules/firebase-admin/node_modules/snapdragon/lib/compiler.js:143:12)
at Object.compile (/user_code/node_modules/firebase-admin/node_modules/snapdragon/lib/compiler.js:168:10)
at Snapdragon.compile (/user_code/node_modules/firebase-admin/node_modules/snapdragon/index.js:156:32)
at /user_code/node_modules/firebase-admin/node_modules/micromatch/index.js:786:23
at memoize (/user_code/node_modules/firebase-admin/node_modules/micromatch/index.js:859:13)
at Function.micromatch.compile (/user_code/node_modules/firebase-admin/node_modules/micromatch/index.js:783:10)
at create (/user_code/node_modules/firebase-admin/node_modules/micromatch/index.js:686:25)
at /user_code/node_modules/firebase-admin/node_modules/micromatch/index.js:695:16

  • Firebase SDK version: 3.18.5
  • Firebase Functions version: 1.1.0
  • Firebase Admin version: 5.12.1

Most helpful comment

It appears that firebase-admin is using a buggy version of nanomatch that was reverted right after the issue was created.

Please see https://github.com/micromatch/nanomatch/issues/15 for more details.

All 10 comments

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

It appears that firebase-admin is using a buggy version of nanomatch that was reverted right after the issue was created.

Please see https://github.com/micromatch/nanomatch/issues/15 for more details.

Is it fixed?
I can not facing this error when re-deploy my function to Firebase.

Please see micromatch/nanomatch#15 for updates.

Looks like Firebase guys fixed their node_modules. It's working now for me. Any confirmations before I close?

I still have the same bug after I delete package-lock and node_modules, and then reinstall the npm modules. What is the version of firebase-admin firebase-functions of your project?

Firebase Functions version: 1.1.0
Firebase Admin version: 5.12.1

Still left with the same bug. Updated everything to the versions @sharanan mentioned.
Pretty frustrating tbh

If it is indeed the same issue, it鈥檚 resolved by simply reinstalling dependencies.

Was this page helpful?
0 / 5 - 0 ratings