nativescript-angular
nativescript-angular copied to clipboard
Error: Invalid rule result: Instance of class Promise.
Environment "dependencies": { "@angular/animations": "~9.1.4", "@angular/common": "~9.1.4", "@angular/compiler": "~9.1.4", "@angular/core": "~9.1.4", "@angular/forms": "~9.1.4", "@angular/platform-browser": "~9.1.4", "@angular/platform-browser-dynamic": "~9.1.4", "@angular/router": "~9.1.4", "@nativescript/schematics": "^1.0.0", "@nativescript/theme": "~2.3.3", "nativescript-angular": "~8.21.0", "nativescript-ui-sidedrawer": "~8.0.0", "reflect-metadata": "~0.1.12", "rxjs": "^6.4.0", "tns-core-modules": "~6.5.0", "tslib": "^1.11.2", "zone.js": "~0.10.3" }, "devDependencies": { "@angular/cli": "^9.1.4", "@angular/compiler-cli": "~9.1.4", "@ngtools/webpack": "^9.1.4", "codelyzer": "^5.2.2", "nativescript-dev-webpack": "~1.5.1", "node-sass": "^4.7.1", "tslint": "~5.19.0", "typescript": "~3.8.3" }
Although we are using the latest version of Angular in this build, the same bug occured when using the default version of Angular 8.2.x with NativeScript
Describe the bug
I am getting an error upon completing the Creating a New Project guide in the docs.
The app builds just fine, but generating Angular/NS components via the NS CLI with tns generate component some-component throws following error:
Error: Invalid rule result: Instance of class Promise.
at t.project (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:250:1038)
at t._tryNext (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:30:1878)
at t._next (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:30:1780)
at t.next (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1093)
at e._subscribe (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:74:13873)
at e._trySubscribe (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:4641)
at e.subscribe (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:4427)
at e.call (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:30:1459)
at e.subscribe (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:4299)
at C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:145:10377
at s (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:6063)
at t._innerSub (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:30:2033)
at t._tryNext (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:30:1957)
at t._next (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:30:1780)
at t.next (C:\Users\BenediktScheffbuch\AppData\Roaming\npm\node_modules\nativescript\node_modules\@nativescript\schematics-executor\dist\index.js:16:1093)
at SafeSubscriber.__tryOrUnsub (C:\Users\BenediktScheffbuch\source\dsp-IT\test\mobileApp\node_modules\rxjs\internal\Subscriber.js:207:16)
I've tried the instructions in stackoverflow here and an issue created in here, that was never solved.
To Reproduce Follow the Creating a New Project guide in the ns-angular docs
Expected behavior
tns g c should create a ns-angular component through the Angular CLI.
Additional context
I even deleted my global node_modules before doing the Creating a New Project guide and reinstalled the latest Angular CLI, NativeScript CLI and NativeScript schematics.
The curiosity is, that we have an existing Angular project that we integrated with NativeScript, where everything worked like a charm. But we cannot find the difference in between both project setups that is causing this error for us.
Same issue for me
Anyone managed to solve this or find a workaround at least?
Same issue on my end
Same issue for me. Has anyone managed to workaround it?