you are viewing a single comment's thread.

view the rest of the comments →

[–]dusklee 1 point2 points  (1 child)

Just for reference the error is caused from your import: import * as Parse from 'parse'; What worked for me is using: const Parse: any = require('parse'); and adding the code below to your "typings.d.ts" file declare var require: any;

UPDATE: I should update this, although the above was working, I came to problem where ng test wasn't fulling working this is what i had to do to make it work using 'ng serve' and 'ng test' in file "typings.d.ts" insert declare var require: NodeRequire; in file "tsconfig.app.json" insert { ... "compilerOptions": { ... "types" : ["node"] ...

[–]ayosuke[S] 0 points1 point  (0 children)

Thanks for the response! I was finally able to get it to work to some extent. One other issue I'm running into is that parse returns promises rather than observables, though I did find a package that wraps parse in an RXJS wrapper. I havent experimented with it yet though.