-
Notifications
You must be signed in to change notification settings - Fork 114
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
Aot typeerror #59
Comments
I see the same issue |
Same here. +1 |
Adding "@ngtools/webpack": "1.2.3" to package.json resolved this issue for me. |
I can confirm
I don't think this issue should be closed though. We shouldn't have to add this to our package.json. The dependencies for this package (ng2-nouislider) should be setup correctly to solve this issue. |
Same here. +1 |
@tb Maybe the discussion in this tickets helps you to solve bug bug. Among other things, it mentions what causes this (or a similar) bug: angular/angular-cli#4072 |
@rerickson1 @kkotak did you add @ngtools/webpack as a dev dependency? It still throws the same error for me :( @angular/cli@1.0.0-beta.32.3 |
@rsquared-digital, Yes I have under dev. I also have "@angular/cli": "1.0.0-beta.30", which might also be relevant. |
@rsquared-digital I have it under dev as well. Here is my package.json content: |
Check your typescript version. Mine is 2.1.5. Other than that, I'm not sure. |
I am having the same issue while building my project in production mode Any work around please, I need to deploy production version?? |
Can confirm. Am getting same error with simple ng build --prod. Error specifically points to ng2-nouislider's ts.
I'm digging into it right now, and I will add my two cents' worth that yes, when releasing, either things like this should be clarified in the instructions on a readme, or should be resolved within the package itself. I recognize that the landscape is still changing rapidly these days, but it is worth it to communicate upfront that a little housekeeping may be necessary to get a particular directive to work in any one person's production environment. I will post any updates if I find a working case that isn't a hack. |
A radical workaround is to use replace the library by the file https://github.com/tb/ng2-nouislider/blob/master/src/nouislider.ts. Just copy it somewhere in your source folder and remove the library from the packages.json until the bug has been fixed. |
@stephanrauh thanks, it works. Confirmed |
SOLVED Per @emoralesb05 in this conversation, which is a closed, open again conversation, what seems to be the issue are source ts files being included in the delivered package, thereby tripping up the build script(s) of angular-cli. I literally went into
and removed
I am now able to:
My current setup is the following:
I upgraded my build following the Upgrade Steps from the Angular-CLI team, listed here. I do not apparently have any reason to cut/paste a reference to @ngtools/webpack in package.json, as listed here. Here are my dependencies and dev dependencies, for anyone's reference:
And in the app itself, I only use the following -
I use the ui slider in a child component, with no other import code being needed. I truly hope this helps everyone get back on track. |
I can confirm --prod build is now working. Thanks! |
Rock n roll, @tb, glad to be of help! |
Version: 1.5.0
Angular2 version 2.4.5 as well as 2.4.6
Angular cli version 1.0.0-beta.30 as well as 1.0.0-beta.26
During aot serve I get this error.
Any ideas?
The text was updated successfully, but these errors were encountered: