Closed trevordaniels closed 8 years ago
The Javascript file is generated from Typescript, the import is
import { Observable, BehaviorSubject } from "rxjs";
I don't know anything about angular2-seed-advanced
and how correct it is with the current ng2 but I see that it uses SystemJS which is more or less replaced by webpack2 in the final angular release. This seems to be the config: https://github.com/NathanWalker/angular2-seed-advanced/blob/master/tools/config/seed.config.ts Here is how it maps rxjs
:
...
'rxjs/*': 'node_modules/rxjs/*',
...
This mapping only applies to submodules of rxjs
, not to imports of rxjs
itself which explains the error. Looking at how this projects does imports from rxjs
itself, I see that it always references the submodule. So this can be fixed by changing our code to read
import { Observable, BehaviorSubject } from "rxjs/Rx";
I have created a PR to fix this issue: https://github.com/xmaestro/angular2-recaptcha/pull/32
Please re-open if the issue still pesists.
thanks for resolving this so quickly
I'm getting the following error when using in the angular2-seed-advanced project.
Error loading http://localhost:5555/node_modules/rxjs.js as "rxjs" from http://localhost:5555/node_modules/angular2-recaptcha/lib/captcha.service.js
Changing this line in captcha.service
var rxjs_1 = require("rxjs");
tovar rxjs_1 = require("rxjs/Rx");
seems to fix it.