-
-
Notifications
You must be signed in to change notification settings - Fork 241
When NativeScript will support Angular 10 ? #2181
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
We have a branch started and expect releasing support the week after July 4th. |
Hello, Would you have any update on this PR? Our team is anxiously waiting for it. We have just started with Angular 10 and it work amazingly fast. We would love to have our NativeScript part on Angular 10 as well. Thanks so much. |
v9 support is still on the way, I don't think that v10 will be supported soon |
It has been a week since the 4th, any update? |
Hi @NathanWalker , man, I did see that you are working a lot to improve nativescript. I appreciate a lot what you guys at NSTUDIO are doing, thank you so much. I am very anxious to use NS with Angular V10. If you can, please, share with us a possible release date. God bless you! |
We were doing some additional testing against some other project setups but planning to publish by end of tomorrow and a beta will be available by midday today that’d be great to have you try. Will post back when that tag is on npm - it will need some cli updates as well to support scoped packages. |
@funder7 v9 support was published weeks ago at beginning of June. |
Angular 10 support is fully working in the linked PR here. |
Thanks for your response, @NathanWalker. Here in my company we are using Angular+NS Shared Code. We use @nativescrit/schematics to work. Do you know if @nativescript/schematics will be in the same stage for angular 10? Thanks man" |
@betosalvador @spencerfontein @lamqson @zhaoyouliang We're working on a blog post with update instructions but before we officially release (targeting eod tomorrow) you can try the following:
Then delete your webpack.config.js file and let the clean/install replace it. (You can view your Then: |
Hey man, thank you very much, I'll test today! |
Interesting, I only find the nativescript-angular release 8.21 on github releases and it is from February, same on npm. Do I look at the wrong place? |
@ceelian, |
That's correct all {N} packages are moving to @NativeScript npm scope and we're making a push to get as many there by 7.0 as possible. We're writing a blog post with further details on Angular 10 update instructions, etc. |
I feel like I am close @NathanWalker, but I am stuck at a point where I have a bunch of errors like this: I am coming from a working Angular 9 version. This reminds me of the errors I had when upgrading to ng9 before I worked out the ngcc.config.js file. I have shotgunned all the entries I could think of into there, but no joy.
|
@sublime392 are you using |
@sublime392 I'm having the same issue as well as many of the form :
ERROR in ./app/about/about.component.ts
Module not found: Error: Can't resolve '@nativescript/angular/common' in
'C:\Users\meyer.000\Pronto\src\app\about'
@ ./app/about/about.component.ts 4:0-51 54:22-43 54:45-73 54:75-97
@ ./app/about/about.module.ts
@ ./app/app-routing.module.ts
@ ./app/app.module.ts
@ ./main.ts
Have you managed to find a solution thus far?
…On Fri, 17 Jul 2020 at 22:44, Andy Winter ***@***.***> wrote:
I feel like I am close @NathanWalker <https://github.com/NathanWalker>,
but I am stuck at a point where I have a bunch of errors like this:
ERROR in
../node_modules/nativescript-ui-sidedrawer/angular/side-drawer-directives.js
Module not found: Error: Can't resolve
'nativescript-angular/element-registry'
I am coming from a working Angular 9 version. This reminds me of the
errors I had when upgrading to ng9 before I worked out the ngcc.config.js
file. I have shotgunned all the entries I could think of into there, but no
joy.
"nativescript-ui-sidedrawer": {
entryPoints: {
"angular": {
override: {
main: "./side-drawer-directives.js",
typings: "./side-drawer-directives.d.ts",
},
ignoreMissingDependencies: true,
}
},
ignorableDeepImportMatchers: [
/tns-core-modules\//,
***@***.***\/core\//,
/nativescript-angular\//,
/nativescript-angular\/element-registry\//,
***@***.***\/angular\/element-registry\//,
***@***.***\/angular\//
]
},
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNDDIANRYZEDRWNJ7UWAELR4CZ27ANCNFSM4OGQGOLA>
.
|
@sublime392 You can use |
@Meyer-dev You don't need deep imports anymore...anywhere. Your |
Thanks @NathanWalker <https://github.com/NathanWalker> . I have tried
removing the deep imports. For some reason, no matter what I do, the same
error msgs appear. They all look like
ERROR in ./app/about/about.component.ts
Module not found: Error: Can't resolve '@nativescript/angular/common' in
'C:\Users\meyer.000\Pronto\src\app\about'
@ ./app/about/about.component.ts 4:0-51 54:22-43 54:45-73 54:75-97
@ ./app/about/about.module.ts
@ ./app/app-routing.module.ts
@ ./app/app.module.ts
@ ./main.ts
ERROR in ./app/addresSearch/addresSearch.component.ts
Module not found: Error: Can't resolve '@nativescript/angular/common' in
'C:\Users\meyer.000\Pronto\src\app\addresSearch'
@ ./app/addresSearch/addresSearch.component.ts 9:0-51 73:22-42
@ ./app/addresSearch/addresSearch.module.ts
@ ./app/storeselection/storeselection.module.ts
@ ./app/app-routing.module.ts
@ ./app/app.module.ts
@ ./main.ts
The weird thing is that those error msgs are displaying after I've cleaned
it and I don't have deep imports in my components.
I'm building with nsc build android --clean after manually deleting
platforms,node_modules,hooks and package.json lock as well as webpack. I've
also tried copying and pasting the webpack file from the blog post link.no
success.
My package.json file is as follows
{
"nativescript": {
"id": "org.nativescript.Pronto",
"profiling": "timeline",
"tns-ios": {
"version": "6.5.0"
},
"tns-android": {
"version": "6.5.3"
}
},
"android": {
"markingMode": "none"
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"src/**/*.ts\"",
"clean": "npx rimraf hooks node_modules package-lock.json platforms",
"ngcc": "ngcc --properties es2015 module main --first-only",
"postinstall": "npm run ngcc"
},
"dependencies": {
"@angular/animations": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/forms": "~10.0.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@nativescript/angular": "rc",
"@nativescript/core": "rc",
"@nativescript/theme": "~2.3.0",
"@nstudio/nativescript-cardview": "^1.0.0",
"android": "0.0.8",
"extension": "^0.2.0",
"nativescript-accordion": "^6.0.0-beta.2",
"nativescript-algolia": "^1.2.2",
"nativescript-google-maps-sdk": "^2.9.1",
"nativescript-google-places-autocomplete": "^1.0.3",
"nativescript-imagepicker": "^7.1.0",
"nativescript-lottie": "^4.0.1",
"nativescript-material-components": "^1.2.1",
"nativescript-material-dialogs": "2.3.24",
"nativescript-material-slider": "2.3.24",
"nativescript-material-textfield": "^2.3.24",
"nativescript-plugin-firebase": "10.5.2",
"nativescript-speech-recognition": "^1.5.0",
"nativescript-statusbar": "^5.0.0",
"nativescript-theme-core": "1.0.6",
"nativescript-ui-dataform": "6.0.0",
"nativescript-ui-listview": "rc",
"nativescript-ui-sidedrawer": "rc",
"platform": "^1.3.5",
"reflect-metadata": "0.1.13",
"rxjs": "^6.5.5",
"uglifyjs-webpack-plugin": "2.2.0",
"zone.js": "^0.10.3"
},
"devDependencies": {
"@angular/compiler-cli": "~10.0.0",
"@nativescript/types": "rc",
"@nativescript/webpack": "rc",
"@ngtools/webpack": "~10.0.0",
"@phenomnomnominal/angular-lazy-routes-fix": "^0.1.5",
"codelyzer": "5.2.2",
"jscrambler-webpack-plugin": "5.5.0",
"node-sass": "^4.13.1",
"tslint": "^6.1.1",
"typescript": "~3.9.0"
},
"readme": "NativeScript Application"
}
…On Sat, 18 Jul 2020 at 21:06, Nathan Walker ***@***.***> wrote:
@Meyer-dev <https://github.com/Meyer-dev> You don't need deep imports
anymore...anywhere. Your app/about/about.component can just be updated to
remove the import from @nativescript/angular/common to *just*
@nativescript/angular
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNDDIHULCAUJN3KWTRKFF3R4HXE5ANCNFSM4OGQGOLA>
.
|
@Meyer-dev Definitely would like to run that project and see - possible to send email to [email protected] with a way to download the project by chance to keep it private? |
@NathanWalker thanks. Using the 'rc' branch cleared the errors for those two. Now I just have a bunch of libs throwing an error (because they are trying to do a deep import on @nativescript/angular?).
I don't imagine many of these will be updated anytime soon. Is there some sort of configuration magic that can be done? |
@NathanWalker <https://github.com/NathanWalker> I managed to get it
working by running the project first. It built and then crashed with the
same issues on startup. I then simultaneously flattened all imports by
searching @nativescript/angular/common and replaced it
with @nativescript/angular in VS code; when it automatically restarted all
those errors disappeared. Don't know why that worked but glad it did. The
rc branch of modules mentioned in emails above also cleared a few more
errors. The errors I have now are related to nativescript-plugin-firebase
but I think we will need to wait for Eddy Verbruggen to update that first?
Thanks again for all your efforts.
…On Mon, 20 Jul 2020 at 16:55, Andy Winter ***@***.***> wrote:
@NathanWalker <https://github.com/NathanWalker> thanks. Using the 'rc'
branch cleared the errors for those two. Now I just have a bunch of libs
throwing an error (because they are trying to do a deep import on
@nativescript/angular?).
Example:
ERROR in ../node_modules/nativescript-material-cardview/angular/index.js
Module not found: Error: Can't resolve ***@***.***/angular/element-registry'
I don't imagine many of these will be updated anytime soon. Is there some
sort of configuration magic that can be done?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNDDIFB4MWA267G37G47MDR4RLFBANCNFSM4OGQGOLA>
.
|
@Meyer-dev awesome good to hear. So yes you can actually switch that to Clean/rebuild after that switch. |
@sublime392 I'll look at compat lib but I'll also look at that plugin and let ya know (hopefully by this evening) |
@NathanWalker @nativescript/firebase seems to do the trick. I actually
found it when I went to go look at PRs for updates, found your things. Feel
very comfortable about it being under @nativescript/firebase. What I
believe is my last obstacle is the Error:
ERROR in src/app/logout/logout.component.ts:56:47 - error TS2339: Property
'getRootView' does not exist on type 'typeof
import("C:/Users/meyer.000/Pronto/node_modules/tns-core-modules/application/index")'.
const sideDrawer = <RadSideDrawer>app.getRootView();
Is the API still the same as in template for sidedrawer on marketplace? I
have seen the drawer being accessed using:
// @ViewChild(RadSideDrawerComponent, { static: false }) public
drawerComponent: RadSideDrawerComponent;
// private drawer: RadSideDrawer;
// ngAfterViewInit() {
// this.drawer = this.drawerComponent.sideDrawer;
// }
is that the way to go?
im using the module : "nativescript-ui-sidedrawer": "rc",
…On Mon, 20 Jul 2020 at 22:19, Nathan Walker ***@***.***> wrote:
@sublime392 <https://github.com/sublime392> I'll look at compat lib but
I'll also look at that plugin and let ya know (hopefully by this evening)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNDDIHZNZTRFGZWMEOE3L3R4SRG3ANCNFSM4OGQGOLA>
.
|
@Meyer-dev for this error For the
And drop a |
@NathanWalker |
@juniorschen oh sorry, RLV === |
@NathanWalker I created a repository where the problem happens, all I did was follow this document and finally add the radlist: |
ok excellent this is helpful, will check it out. |
@juniorschen We greatly appreciate you reporting that. There were 2 classes in RadListView for Android which needed NativeClass decorations. Please use |
@NathanWalker ts An async function or method in ES5 / ES3 requires the 'Promise' constructor This happens when generating the project and using lazy routes, it is a tsconfig module configuration, but the default is to make lazy routes correct? |
@juniorschen We'll take a look, yes you're correct the schematics should be using the |
@NathanWalker The same problem with RadList seems to be repeated with the use of Tabs such as: |
@NathanWalker |
@juniorschen thank you once again for excellent reporting - indeed the |
@NathanWalker |
@NathanWalker I also realized that in debug mode I have this message on screen, I really don't know very well what the lack of this function can cause in the final size of my app or functionality. |
Are you using @nativescript/webpack 2.1.1? - If so curious if you deleted your webpack.config and let it regenerate you a new one with that latest version? |
@NathanWalker I didn't know about this version, the newest shematics are still generating in version 2.0.0, when I upgraded to 2.1.1 and tried to update my webpack I had the following problem: |
@juniorschen just delete your webpack.config.js entirely - vs. using the .bin script - We will probably update that bin script in the next week but confirming some other 7.0 details. When you clean/rerun your project it will auto add a webpack.config back to your project. |
@NathanWalker For being in the webpack this scares me, because the final size of the app is very important, but I don't understand enough about it yet. |
@NathanWalker |
@NathanWalker, is it possible to reopen the issue ? I've tried to add this code in "nativescript-ui-listview": {
entryPoints: {
"angular": {
override: {
main: "./listview-directives.js",
typings: "./listview-directives.d.ts",
},
ignoreMissingDependencies: true,
}
},
ignorableDeepImportMatchers: [
/tns-core-modules\//,
/@nativescript\/core\//,
/@nativescript\/angular\//
]
} Got same error.. |
@juniorschen testing support is in progress. @bastienlemaitre remove |
@NathanWalker do you guys face any issue when running ios with release/production flag?
I received this error even when I created project from scratch, as described here: https://nativescript.org/blog/upgrading-tips-for-angular-10/
|
@NathanWalker, works. Thx ! |
@NathanWalker You mentioned (#2181 (comment)) that you were looking into compat lib etc for these plugins. Is there a way to work around the deep linking? I have issues with nativescript-drop-down caused by the same element-registry deep linking. |
Something that may help is creating a |
How to re-create Also, where's the source code for |
@xuhcc source is here: We will probably archive that old repo soon. Run ‘ns clean’ to make sure node_modules is clear. Then ‘npm I’ and upon installation of dependencies it will add the webpack.config as a postinstall step. |
@NathanWalker I tried to
The same message appears with |
Hi @NathanWalker, Is it okay to use yarn instead of npm? Because I install all dependencies and then try to run tns run android --env.aot, but all dependencies are installed again using npm. |
@rickwalking |
we aren't using angular but a package we are using that hasn't been updated is
Is there a way to fix this or a newer package similar to this package that we should use? |
@24jr |
Hi, my question is when native script will support angular 10. The background is that we use Angular + NativeScript for cross platform development (Web IOS). Now we need to upgrade angular 10 and confirm whether native script supports it.
This is very important. Look forward to your reply. thanks
The text was updated successfully, but these errors were encountered: