-
Notifications
You must be signed in to change notification settings - Fork 817
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 Compilation is not worked. #629
Comments
@DoyeonOhTravelHow can you share your app.module.ts code? thanks! |
I'm seeing the same thing - possibly something to do with a missing |
@SebastianM actually the Angular team suggests that library vendors should also ship .metadata.json files. These files are produced automatically by ngc. Your might find below comments useful: angular/angular#11262 (comment) angular/angular#11262 (comment) angular/angular#11262 (comment) Complete conversation (angular/angular#11262) |
@SebastianM this is my app.module.ts code. thanks your reply!.
@rh389 @naveedahmed1 As you say, it seems that require |
@SebastianM And this branch is sample code with using googleMap. |
@DoyeonOhTravelHow @doyeonOh @naveedahmed1 thank you guys! I will check it this evening. |
Not sure of the status of this fix, but might be nice to also checkout the same issue at ng2-translate. In it I would highlight a blog post describing how to solve this in general and some links to example repos of libraries solving this |
I wrote the blog post you mentioned. I'm glad you liked it. I think the error you're running into isn't directly related to I've written another article that goes through solutions to some of the errors (including the |
+1 for AoT support Thanks a lot! |
@modularcoder Did you actually get it working? I tried changing the lambda as suggested two posts above into a factory-pattern function and export, but it was still failing. |
@lazarljubenovic only without AoT in build for dev env. I've described the steps here Make sure you have the latest version of @ionic/app-scripts installed which doesn't make AoT compilation during dev build. |
@modularcoder What to do when you have to build the app for android, the error is there... Did you find any solution for that? Probably we should not be using Ionic 2 for apps at this point, nothing really woks... |
@allurco yes, I've managed to build the app without AoT compilation by adding "--dev" flag to build task in package.json. I've created an example repo Refer readme for more info. P.S. Make sure you have the latest version of @ionic/app-scripts package installed. |
@SebastianM any update on when this bug might be fixed? Thanks! |
@basvdijk Sorry guys, I'm currently rewriting the build procress to be able to support AOT. Expect updates in the following days. |
@SebastianM Great! Your effort is really appreciated 👍 |
Great to see this is fixed! Any thoughts on when you are going to release this update? |
Is it fixed? Using angular2-google-maps with AoT throws error "Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol" Can anyone please guide on this? |
I think that bug has fixed and the issue was added in 0.16 milestone |
@naveedahmed1 The milestone for 0.16.0 is at 55% see https://github.com/SebastianM/angular2-google-maps/milestone/12 |
Maybe it's me, but I installed the library from the GitHub repository and I got more 2 errors: Anybody else ? |
@tchinou1 as mentioned earlier the milestone for 0.16.0 with AoT support is at 55% see https://github.com/SebastianM/angular2-google-maps/milestone/12 As far as I'm aware the latest released version does not support AoT yet. |
@basvdijk By running |
@staticint that could be the case indeed. Perhaps @SebastianM can describe how you can install the latest git version with AoT support. |
Edit: sorry, I'm wrong - npm installing should already build for you. By pulling the repo directly with npm you're only getting the source, not the built assets. In theory you could clone this repo, build it locally, and then npm link with your project, but that's probably only practical for local development. Or you could upload tarball of the build somewhere and pull that with npm. |
Does anybody know how to install it from the GitHub repository ? Thanks |
@tchinou1 It's in the npm docs. A question. I just forked, cloned, built and npm-link'd the master branch and on my existing project I get
I tried creating a black new project and tried minimally reproducing the situation, but it works in the other repo so I have no idea where to start looking. It's like it doesn't receive the object passed through Anyone had a similar situation or this error message? I know it's a long shot without any code and a non-reproducible error, but I'm getting out of ideas. |
How can I update my angular google maps so that AOT works? is the AOT version available now? |
To make AOT work, add Then in your app component import the module:
and add it to your imports (replace the xxxx with your api key)
Now in your template you can use the component like:
|
I am using the 0.17.0 milestone, and the error below keeps going. This error has already corrected? |
Issue description
angular2-google-maps does not work in the AOT compile.
Steps to reproduce and a minimal demo of the problem
step 1. Clone angular2-seed project.(
step 2. Install
angular2-google-maps
package.step 3. Configure
SYSTEM_CONFIG_DEV
andSYSTEM_BUILDER_CONFIG
step 4. Write the code on your site Getting Started
step 5.
npm start
(It worked well)step 6.
npm run serve.prod
(It worked well too).step 6.
npm run build.prod.exp
(Error occurs. This build has AOT compilation.)Current behavior
AOT compile was not worked.(compile.ahead.prod)
Expected/desired behavior
I wish worked fine. help me.
angular2 & angular2-google-maps version
angular2: RC6
angular2-google-maps: "0.14.0",
Other information
thanks for read
The text was updated successfully, but these errors were encountered: