-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
angular-cli with SystemJS integration #671
Comments
@razvanmitre – try the following: import Raven = require('raven-js'); This seems to work for most people, but in my AngularJS project with dynamic SystemJS loading, I need the original statement. Would love it if someone from SystemJS could chime in on this. cc @guybedford |
Yes it is working. Thank you. |
@Sija – I've read all these pages before, I understand the difference, and I am convinced using the The issue is that I cannot get my sample app, a complete "Angular 2 Tour of Heroes" example, to load raven-js via SystemJS dynamic loader without using a regular ES6-style import. If someone can help me understand what's going on in that repo, I would be extremely grateful and I can update the docs accordingly. |
@benvinegar did you try: declare module 'raven-js' {
// ...
export = Raven
} and later on: import * as Raven from 'raven-js';
// or
import Raven = require('raven-js'); |
I definitely tried that. I think TypeScript said something to the effect of, "raven-js is not a module". Sorry, I don't have time atm to mess around with this again or I'd explore more. Perhaps next week. |
|
@guybedford – I wasn't familiar with this flag, thanks. I'll start experimenting with it. (And thanks for chiming in 🤘) |
Our TypeScript typings change quite a lot since this was reported. Please feel free to reopen this issue if it's still relevant in any way. |
Hello,
I am using angular-cli with SystemJS, and I have the following issue when trying to use raven-js.
In main.ts I have
import Raven from 'raven-js';
but the compiler throws:
Module '"ncr-angular/node_modules/raven-js/typescript/raven"' has no default export.
In system-config.ts I have:
Am I doing something wrong?
Thanks
The text was updated successfully, but these errors were encountered: