stitch-js-sdk: Type 'StitchClientErrorCode' is not assignable to type 'string'. Angular 6
I have just recommended Stitch to my company. We are testing and it seems the latest stitch client is broken and won’t let my Angular test application compile. As soon as I put the code that creates a new Stitch client, the webpack compilation fails. ` import { Stitch } from “mongodb-stitch-browser-sdk”;
const client = Stitch.initializeDefaultAppClient(‘strat-care-development-zaxso’); ` This is literally the first line without even providing anything. From the logs, it looks like a dependecy issue with the “detect-browser” package. Below is the error.
ERROR in ./node_modules/detect-browser/index.js
Below is my Angular Environment info. Angular CLI: 6.0.8 Node: 8.11.1 OS: darwin x64 Angular: 6.0.6
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (11 by maintainers)
OK I’ve tested the new version and it works fine. Btw, I knew something was wrong at StitchClientErrorCode, StitchRequestErrorCode and RemoteInsertManyResult. I just couldn’t messed up the whole project without clearly understanding every piece of code. Instead I made this dirty patch that was declaring some values as strings instead of numbers which was wrong but at least you got an idea where to fix things. I’m glad I was able to help in the end.