-
-
Notifications
You must be signed in to change notification settings - Fork 241
Crash with scoped package (Can't resolve all parameters for ApplicationModule) #2183
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
Comments
@armpogart is possible to share or invite collaborator on project? I’d be happy to submit a PR to help you clear? |
@NathanWalker I have tried scoped packages on a blank project before migrating my live application, so here is a zipped blank test project. Just run: tns install
tns run android and you will see the crash. It works only if you change the import in import { platformNativeScriptDynamic } from "@nativescript/angular/platform"; |
@armpogart you have to use the
With Angular 10, we will bake that flag into the webpack.config but for now that flag is mandatory (albeit optional since you can still disable ivy if needed) |
@NathanWalker I see, but your guide and AOT flag is for Angular 9, I use Angular 8.2 in that project. Is it also mandatory to use AOT build for Angular 8? P.S. I still use AOT for release build only. |
@armpogart ah i see you mentioned Angular 8 -- I would try to keep AoT on all the time - it's likely it could also lead to an error like you mentioned there when omitting env.aot. |
@NathanWalker I will try your suggestion a little bit later and report back here. But is it ok that everything is working fine without P.S. I wasn't simply using |
Environment
Describe the bug
After creating blank angular template, I have changed
package.json
to use scoped packages:@nativescript/angular' instead of
nativescript-angularand
@nativescript/coreinstead of
tns-core-modules. Removed
node_modules,
platformsand
hooksfolders and reinstalled dependencies. Changed all the imports to use the scoped packages. Running application (
tns run android`) causes crash with following error:The import in
main.ts
file looks like following:If I change it to:
everything works. As mentioned in this issue #1540 (actually in the solution mentioned in it), I guess it has something to do with importing
reflect-metadata
.Do I need to also use more specific imports elsewhere to avoid any other issue (such as
import { NativeScriptModule } from "@nativescript/angular/nativescript.module"
) or is it ok to do justimport { Something } from "@nativescript/angular"
everywhere else?The text was updated successfully, but these errors were encountered: