-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to import/declare to work in Angular2 with Typescript? #1
Comments
I have the same problem but after multiple recompiles it still fails.. |
Do you import it by webpack ? |
Can you give me a example ? |
I've tried various things; the simplest I have that mostly "works" is: % npm install yuki-createjs --save In my package.json: I'm running: ng serve (the automatic recompilation) When I save a .ts file, the compiler complains at every reference, one of: After a couple of retries (retriggering ng serve compilation) I'm new at this; and expect I'm missing something fundamental |
For the record: after upgrading Angular and Typescript to latest versions (4.1.3, 2.3.3) Still trying to get 'ng serve' to find/load yuki-createjs, |
And now, webpack is happy! The solution was to add module.exports to index.js:
|
Do you have an example of how this can be imported when using Angular2 with Typescript?
Doing the simple: import "yuki-createjs";
Generates complaint from compiler: Cannot find name 'createjs'.
(amazingly, if I recompile a couple of times, it eventually is compiled and runs,
but I'm hoping it can be declared to compile the first time)
The text was updated successfully, but these errors were encountered: