-
-
Notifications
You must be signed in to change notification settings - Fork 40
Angular webpack build fails with platform specific TS files #625
Comments
@manojdcoder I've created this demo app based on your own codebase and everything works as expected on my side. Try to rebuild your own project by cleaning the platform folder
|
Thanks for testing but I'm sure the issue exists. Did you build with
bundle, aot and uglify option?
Over slack @sis0k0 confirmed me that the issue was reproduced on her end
and it's something related to latest ng tools, no workaround as of now.
…On Tue, Aug 7, 2018, 4:43 PM Nick Iliev ***@***.***> wrote:
@manojdcoder <https://github.com/manojdcoder> I've created this demo app
<https://github.com/NickIliev/NS-Issues-2018-II/tree/master/nativescript-dev-webpack/issue-625>
based on your own codebase and everything works as expected on my side. Try
to rebuild your own project by cleaning the platform folder
tns platform remove ios
// or rm -rf platforms
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#625 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEwYk8vjBHCOlp59wbbQ_Bx-2jWHdnVeks5uOXZQgaJpZM4Vw4pj>
.
|
@manojdcoder I've built with Note: even with uglify and AOT I am able to build the applicaiton and use the helpers on iOS.
|
@NickIliev run command always works. Use build command, that's where the issue is - while building the IPA / APK. |
The issue is reproducible with tns build ios --bundle |
I was trying to debug this issue, one workaround is to append platform name to the For example while building for iOS, update it as
Another workaround I'm thinking of is, since |
Hey @manojdcoder
and following error when building for Andrioid:
Are these the error you are getting also? |
@vakrilov When building for production, I'm getting this error
If I make ui-helper as a external plugin, then I get the errors you mentioned above. |
any luck? I got also the issue after upgrading to webpack v0.15. the plugin |
@vakrilov @NickIliev Any workaround might greatly help, please let us know. |
+1 with |
Is there any workaround for this? might greatly help for my current project, cause I can't update to the latest version of NS and NS-webpack because of this issue. :( |
@NickIliev will the fixes for this issue will be included in NS 5.0? hoping |
Unfortunately not yet with {N} 5.0. |
@manojdcoder is there any workaround for this one? because I couldn't proceed because of this problem for months. |
@jannotabamo You may move your module to project root and mark that as an external plugin in In my case, I had move
Then updated paths in my
If I make any changes inside
|
to add more details, the problem also exists when using platform specific components in aot build with I don't know if it's related to this issue or not. |
@NickIliev @vakrilov Any progress on this yet? It has become quite impossible to write any platform specific code within project. |
A work around for this would be to create an
you can check out https://github.com/triniwiz/nativescript-socketio/tree/master/src for and example |
@triniwiz I tried that already but that still doesn't solve the issue. I have few delegate implementation in the For example here is what I do with Dropdown plugin, it throws error when I compile for android. Similarly android specific code throws error on iOS compilation.
|
@NickIliev any updates on this? It seems like a pretty big deal. I am in the process of upgrading from NS 3.X to V5 and I cannot webpack my app. I have a delegate.ios.ts and I get errors similar to above. I also have several other platform specific TS files throughout my app. |
I kept my upgrades on hold just because of this issue. Now with no option I converted everything to a local plugin and still commenting all android specific code while running build for iOS and vice versa to avoid this error which is really annoying. |
@vtjon @manojdcoder with the latest versions (modules, nativescript-dev-typescript) I am not able to reproduce the issue (using this demo) - can you let us know what are the exact steps and what change should I do in the test project to make this one reproducible. I am running
and accessing the helper method here |
fwiw, I cloned the repo and the build initially worked. I then added delegate.ios.ts to my project and I got the error: I created an ios platform specific version of app.component as well. It does not appear to throw an error on that. The changes are here: |
@NickIliev @vtjon That is the one issue I noticed so far, when importing platform specific files the compiler expects Still running further tests. |
I tried tns build ios --bundle --release and still got the same error. |
@NickIliev With latest modules the compilation is far better than how it used to be, at least not a blocker any more. Thank you and team for that. I observed the two issues below,
|
Same issue. For example: It would be great if we can hear any progress on this. |
Same issue. Module build failed (from ../node_modules/@ngtools/webpack/src/index.js): |
Hello Guys, I have just migrated a project from TS4 to TS5.
As a comment, my project in specific was having an issue when building with A while ago I faced the issue described on this post #306. So while the
After upgrading to NS5 the issue was generating again, but now, it won't even support the format described above. To make a long story short, the way that I solved it, was leaving the regular TS import as shown below, and just adding a My import looks like this.
My
Hope that can help anyone and save some time. |
This should be fixed by #843 |
This is fixed in the current master branch and available in |
Issue Checklist
Tell us about the problem
I have a helper plugin within my Angular project,
After upgrading to Angular 6 + NativeScript 4.x, it throws complier error as below.
Local environment
Project data
The text was updated successfully, but these errors were encountered: