-
Notifications
You must be signed in to change notification settings - Fork 29
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
Problem with npm package to import autosize #20
Comments
Had same problem, typed out the relative route manually ( import {Autosize} from 'angular2-autosize/src/autosize.directive'; |
getting error Runtime Error Please suggest |
@MatthewMerrill - I think a better approach would be to use the
This way, you can now do |
@kimbaudi That's indeed much cleaner and works great for me. Since I already had |
Here is my environment :
angular2-autosize 1.0.1
angular 2.4.7
typescript 2.1.5
npm 3.10.10
Visual Studio 2015
My tsconfig :
In my application module I want to import the autosize directive. I do as mentioned in the documentation :
I get a compilation error :
According to typescript documentation about module resolution (see How TypeScript resolves modules section in official documentation), it seems normal as in the npm package of angular2-autosize, there is no typings entry in the package.json file, nor an index.ts file.
It would be well to correct this problem, as it is very easy.
So to continue, i change my import to :
as there is a angular2-autosize.ts file in the npm package.
When I do that, my project compile but the resulting js file is not acceptable as it contains :
I think it is because the npm packages has two problems :
The text was updated successfully, but these errors were encountered: