You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: childPathObj.split is not a function
at pathChild (/REDACTED/node_modules/@firebase/database-compat/dist/index.standalone.js:6429:40
Steps and code to reproduce issue
The only reason I'm creating this ticket is because the one I wanted to leave a comment on is locked and closed.
I wanted to shed some light on what I think the issue is.
The error happens because the check childPathObj instanceof Path in node_modules/@firebase/database-compat/dist/index.standalone.js comes back as false when it should be true. It's on line 6421
Two different instances of Path are existing, maybe it's because I'm mixing firebase-admin with firebase.
The childPathObj is being instantiated by the Path class in the file node_modules/@firebase/database/dist/index.node.cjs.js but at this point where we error we're running the code in node_modules/@firebase/database-compat/dist/index.standalone.js
Perhaps this check could be a bit more forgiving. Or a warning when multiple versions are in use could be helpful. I think it's an incompatibility with using the admin sdk (which loads the 'compat' code) with the v9 normal sdk (I've tried to hack it to make it work without success). It would be helpful if there were some docs on how to use the modular sdk server side, or a definitive warning that its not possible, or a solution so the packages are compatible. I think the reason I've ended up in this mess is because I have a lot of v9 modular code written client side which I've copied over to a script I'm trying to run on the backend. From what I can tell I don't think this will ever work and I need to write non modular code for my backend scripts.
The text was updated successfully, but these errors were encountered:
Operating System
MacOS 14.2 (23C64)
Browser Version
Chrome 122.0.6261.112
Firebase SDK Version
10.8.1
Firebase SDK Product:
Database
Describe your project's tooling
Node CommonJS server.
Describe the problem
When running a
set
command I receive the error.Steps and code to reproduce issue
The only reason I'm creating this ticket is because the one I wanted to leave a comment on is locked and closed.
I wanted to shed some light on what I think the issue is.
The error happens because the check
childPathObj instanceof Path
innode_modules/@firebase/database-compat/dist/index.standalone.js
comes back asfalse
when it should betrue
. It's on line 6421Two different instances of
Path
are existing, maybe it's because I'm mixingfirebase-admin
withfirebase
.The
childPathObj
is being instantiated by thePath
class in the filenode_modules/@firebase/database/dist/index.node.cjs.js
but at this point where we error we're running the code innode_modules/@firebase/database-compat/dist/index.standalone.js
sample code
package.json
Perhaps this check could be a bit more forgiving. Or a warning when multiple versions are in use could be helpful.I think it's an incompatibility with using the admin sdk (which loads the 'compat' code) with the v9 normal sdk (I've tried to hack it to make it work without success). It would be helpful if there were some docs on how to use the modular sdk server side, or a definitive warning that its not possible, or a solution so the packages are compatible. I think the reason I've ended up in this mess is because I have a lot of v9 modular code written client side which I've copied over to a script I'm trying to run on the backend. From what I can tell I don't think this will ever work and I need to write non modular code for my backend scripts.The text was updated successfully, but these errors were encountered: