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
I recently updated may of my project files including firebase, my angular frontend, and ran npm audit fix --force on the backend side where I have an express JS app and gstore-node
Since then, I run into this error when starting my backend
TypeError: OptionalDataloader is not a constructor
at Object.exports.createDataLoader (/app/node_modules/gstore-node/lib/dataloader.js:36:12)
at Gstore.createDataLoader (/app/node_modules/gstore-node/lib/index.js:152:29)
at Function.__populate (/app/node_modules/gstore-node/lib/model.js:471:70)
at Function.get (/app/node_modules/gstore-node/lib/model.js:127:32)
at Function.Model.findUserToAuthenticate (/app/src/models/user.model.js:112:33)
at onFacebookAuthenticate (/app/src/appbase/auth.ts:56:36)
My findUserToAuthenticate method just calls existing_user = await Model.get(id); where Model = gstore.model(schemaName, userSchema);
Environment
OS - OS name and version : macbook m2 macOs 14.2 (23C64)
node - node version : v18.19.0
gstore-node - package version : "gstore-node": "^7.2.8",
Expected behavior
Describe what you expected to happen
Actual behavior
My backend crashes with the described error
Reproduction
Not really sure what may have caused this issue. I'm runing everything from docker-compose but it used to run fine. I will try to isolate package changes when I have time
Possible solution
N/A
The text was updated successfully, but these errors were encountered:
Are you using yarn? Seems like the optional package is not able to resolve the dataloader import and it is configured to return null if the import couldn't be resolved. As a workaround, I have patched the package to removed the usage of optional package and require the package directly which works:
Description
I recently updated may of my project files including firebase, my angular frontend, and ran npm audit fix --force on the backend side where I have an express JS app and gstore-node
Since then, I run into this error when starting my backend
My
findUserToAuthenticate
method just callsexisting_user = await Model.get(id);
whereModel = gstore.model(schemaName, userSchema);
Environment
Expected behavior
Describe what you expected to happen
Actual behavior
My backend crashes with the described error
Reproduction
Not really sure what may have caused this issue. I'm runing everything from docker-compose but it used to run fine. I will try to isolate package changes when I have time
Possible solution
N/A
The text was updated successfully, but these errors were encountered: