-
Notifications
You must be signed in to change notification settings - Fork 300
ngc: Error: Unexpected value... #145
Comments
This is not a rollup error. The is an Thanks, |
@danbucholtz thanks Dan, is there anything specific I can recommend the author to do to support ngc? |
Can you spin up a new Angular project via the Angular CLI and test this out? It may be an issue on our end but let's figure out for sure. So far, from what I've seen 8/10 it has been an issue with the library itself. Let me know how it goes and we'll go from there. Thanks, |
Will do. I know they are using commonjs as the module for compiling, would that be the cause? |
I started a new angular 2 project using this project: https://github.com/angular/quickstart/blob/master/README.md I added the DynamicComponentModule as described above, and I can run the project without errors. I ran The project author is saying he doesn't get this error, so I'm thinking it might be something wrong in ionic-app-scripts. |
Can you do this with with the Use the webpack version of it. Thanks, |
Please let me know if your issue is resolved @scottopolis. This more than likely is not an Ionic issue, but I'd like to help anyway. I'm going to close this but will re-open if needed. Thanks, |
Hi Dan, I used the angular cli to test this again in a fresh project, and there were no issues building using DynamicComponentModule. I updated to the latest ionic cli and ionic-app-scripts, then installed a fresh Ionic project with no modifications, and then installed DynamicComponentModule, and I'm getting the same error:
To reproduce the error, create a new Ionic 2 project, then:
Add the module:
Then build:
Thanks for your help! |
Does the angular CLI use |
@danbucholtz I'm not sure, I used the latest version |
Hi @scottopolis, This is an issue with the library, not Ionic. Angular Libraries that can utilize In order to disable Thanks, |
Thanks for the follow up Dan, this has been very helpful for me! |
Rollup doesn't let you build if using an npm module that doesn't support AoT compiling, which seems to be all of the ones I try ;)
ionic serve works because it's not using AoT compiling.
This seems to be an issue with ngc in the ionic build script, here's the error I get:
ngc: Error: Unexpected value 'DynamicComponentModule' imported by the module 'AppModule'
I'm using a normal import:
Steps to reproduce:
npm install core-js@~2.4.0 --save
npm install ts-metadata-helper --save
npm install angular2-dynamic-component --save
Which @ionic/app-scripts version are you using?
Whatever comes with Ionic 2.1.0
If this is not solvable, is there a way to disable the AoT compiling in rollup.js temporarily so I can build?
The text was updated successfully, but these errors were encountered: