Tns run iOS could not detect device (Further TypeScript errors)

ios

#1

Hello my friends,

I’m really frustrated. Since several weeks I’m struggling with building my project (working fine before).

I did a lot of tns updates/doctor updating and re-installing nom modules etc. with no real success. The scenario is as follows:

‘tns run ios’ starts a demo device and gives the following message:

Unable to find applicable devices to execute operation. Ensure connected devices are trusted and try again.

If I start ‘tns run ios’ again I get the following message:

app/tns_modules/@angular/router/upgrade/src/upgrade.d.ts(9,31): error TS2307: Cannot find module ‘@angular/upgrade/static’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2304: Cannot find name ‘java’.

and a lot of error messages.

I’ve been a very happy participant of your European Developer Day event, but this problem is driving me nuts. I spend so much time on the environment problems, there was no time left to do any kind of development for my product/idea.

If there would be any help outside I would really appreciate.

Many thanks, Michael


#2

Hi @mkirbach, as I understand from your words you had a working project, then you upgraded that project and it stopped working?
Could you provide a bit more information like:

  • With what version of CLI did your project last worked with (built ok)?
  • What version of CLI are you using now?
  • When you started the command tns run ios did you have a working simulator or device connected?

#3

Hi @plamen5kov, thank you very much for your reply.

Yes I had a working project and after upgrading the project it didn’t work anymore. Unfortunately, I don’t know the exact version number of the last succcessfull run (something 3.*, about 3 month ago).
The versions I’m currently using are as follows:
┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.2.1 │ 3.2.1 │ Up to date │
│ tns-core-modules │ 3.2.0 │ 3.2.0 │ Up to date │
│ tns-android │ 3.2.0 │ 3.2.0 │ Up to date │
│ tns-ios │ 3.2.0 │ 3.2.0 │ Up to date │
└──────────────────┴─────────────────┴────────────────┴─────────────┘

When I start the command ‘tns run ios’ and no device is connected and the resulting message is:

Searching for devices…
Unable to find applicable devices to execute operation. Ensure connected devices are trusted and try again.

When I start the command ‘tns update’ within the project folder the last output lines are as follows:

├─┬ rxjs@5.2.0
│ └── symbol-observable@1.0.4
├── UNMET PEER DEPENDENCY tns-core-modules@^3.0.0 || ^3.0.0-rc.1 || >=3.0.0-2017
├── typescript@2.2.2
└── zone.js@0.8.4

npm WARN nativescript-angular@3.0.0 requires a peer of tns-core-modules@^3.0.0 || ^3.0.0-rc.1 || >=3.0.0-2017 but none was installed.
npm WARN nativescript-pro-ui@3.1.4 requires a peer of tns-core-modules@^3.1.0 || >3.2.0- but none was installed.
groceries@ /Users/michael/NativeScript-Projects/groceries
└─┬ tns-core-modules@3.2.0
└── tns-core-modules-widgets@3.2.0

The command ‘tns build ios’ now fails as follows:

Executing before-prepare hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.2.2
app/tns_modules/@angular/router/upgrade/src/upgrade.d.ts(9,31): error TS2307: Cannot find module ‘@angular/upgrade/static’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2304: Cannot find name ‘java’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2503: Cannot find namespace ‘java’.

TypeScript compiler failed with exit code 1

If I run the command ‘tns run ios’ with a connected simulator device, the output is similar to the build command:

Searching for devices…
Executing before-liveSync hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-liveSync/nativescript-angular-sync.js
Executing before-prepare hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.2.2
app/tns_modules/@angular/router/upgrade/src/upgrade.d.ts(9,31): error TS2307: Cannot find module ‘@angular/upgrade/static’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2304: Cannot find name ‘java’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2503: Cannot find namespace ‘java’.

The following did not improve the situation:

npm uninstall -g nativescript
npm cache clear
npm install -g nativescript

If you have any idea - thanks a lot!

Michael


#4

Hi @mkirbach,
I see a couple of things we can check out.

  • On tns run ios, a device can’t be found and ran, so try running it manually and check if CLI still wont find it using:
    tns run ios
  • Install nativescript-angular@4.2.0 the one you currently have is version 3.0.0 and it requires modules ^3.0.0 || ^3.0.0-rc.1 || >=3.0.0-2017 as it is stated in the npm warning message:
pm WARN nativescript-angular@3.0.0 requires a peer of tns-core-modules@^3.0.0 || ^3.0.0-rc.1 || >=3.0.0-2017 but none was installed.

You can do that by running:
npm i nativescript-angular@4.2.0 --save

  • Another thing you might want to upgrade is typescript. Currently you have typescript 2.2.2, and the latest compatible version is 2.4.2. Keep in mind when you upgrade it you need to install it as a dev dependency.
    npm i typescript@2.4.2 --save-dev

  • The last thing: after you’ve made all the previous changes, if the project still blows up, please run:
    tns build ios --log trace
    so we can take a good look at what’s happening.

Thank you for the percistance, we’ll get to the bottom of it!


#5

Hi @plamen5kov,

thanks again for your support. Unfortunately the suggested steps did not solve my problem.

The unmet peer dependency still exist, however npm list shows the correct version.

Starting the demo device before ‘tns run ios’ leads to the same TypeScript error.

Please find below the end of the log of the ‘tns build ios’:

Michaels-iMac:groceries michael$ tns build ios --log trace

Found peer TypeScript 2.4.2
/Users/michael/.nvm/versions/node/v7.9.0/bin/node --max_old_space_size=4096 /Users/michael/NativeScript-Projects/groceries/node_modules/typescript/lib/tsc.js --project /Users/michael/NativeScript-Projects/groceries --inlineSourceMap --inlineSources
Hook promises to signal completion
app/tns_modules/@angular/animations/browser/src/render/web_animations/web_animations_player.d.ts(10,22): error TS2420: Class ‘WebAnimationsPlayer’ incorrectly implements interface ‘AnimationPlayer’.
Property ‘totalTime’ is missing in type ‘WebAnimationsPlayer’.

app/tns_modules/@angular/compiler/src/aot/static_reflector.d.ts(8,10): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵReflectorReader’.
app/tns_modules/@angular/compiler/src/compile_metadata.d.ts(8,109): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵLifecycleHooks’.
app/tns_modules/@angular/compiler/src/directive_resolver.d.ts(8,27): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵReflectorReader’.
app/tns_modules/@angular/compiler/src/lifecycle_reflector.d.ts(8,10): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵLifecycleHooks’.
app/tns_modules/@angular/compiler/src/metadata_resolver.d.ts(8,75): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵReflectorReader’.
app/tns_modules/@angular/compiler/src/ng_module_resolver.d.ts(8,26): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵReflectorReader’.
app/tns_modules/@angular/compiler/src/pipe_resolver.d.ts(8,22): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵReflectorReader’.
app/tns_modules/@angular/compiler/src/template_parser/template_ast.d.ts(8,27): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/core/core"’ has no exported member ‘ɵLifecycleHooks’.
app/tns_modules/@angular/compiler/testing/src/testing.d.ts(38,22): error TS2420: Class ‘TestingCompilerImpl’ incorrectly implements interface ‘TestingCompiler’.
Property ‘loadAotSummaries’ is missing in type ‘TestingCompilerImpl’.
app/tns_modules/@angular/platform-browser/animations/src/providers.d.ts(8,119): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/animations/browser"’ has no exported member ‘ɵDomAnimationEngine’.
app/tns_modules/@angular/router/testing/src/router_testing_module.d.ts(10,25): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/router/router"’ has no exported member ‘RouterOutletMap’.
app/tns_modules/@angular/router/upgrade/src/upgrade.d.ts(9,31): error TS2307: Cannot find module ‘@angular/upgrade/static’.
app/tns_modules/nativescript-angular/animations/animation-engine.d.ts(1,10): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/animations/browser"’ has no exported member ‘ɵDomAnimationEngine’.
app/tns_modules/nativescript-angular/animations/animation-player.d.ts(4,22): error TS2420: Class ‘NativeScriptAnimationPlayer’ incorrectly implements interface ‘AnimationPlayer’.
Property ‘totalTime’ is missing in type ‘NativeScriptAnimationPlayer’.
app/tns_modules/nativescript-angular/router/page-router-outlet.d.ts(2,10): error TS2305: Module ‘"/Users/michael/NativeScript-Projects/groceries/node_modules/@angular/router/router"’ has no exported member ‘RouterOutletMap’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2304: Cannot find name ‘java’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(2,25): error TS2503: Cannot find namespace ‘java’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(3,39): error TS2503: Cannot find namespace ‘java’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(4,24): error TS2503: Cannot find namespace ‘java’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(5,32): error TS2503: Cannot find namespace ‘java’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(6,31): error TS2503: Cannot find namespace ‘java’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(7,23): error TS2503: Cannot find namespace ‘java’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(33,53): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(34,55): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(35,37): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(42,44): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(43,48): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(44,71): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(44,128): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(45,37): error TS2694: Namespace ‘android’ has no exported member ‘graphics’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(47,41): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(47,89): error TS2694: Namespace ‘android.support.v7.app’ has no exported member ‘AppCompatDialog’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(47,122): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(48,37): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(49,36): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(53,32): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(54,33): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(56,29): error TS2694: Namespace ‘android’ has no exported member ‘graphics’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(59,40): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(62,47): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(64,47): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(66,46): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(68,41): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(69,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(70,38): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(71,22): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(72,32): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(73,40): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(75,29): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(81,29): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(85,48): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(86,31): error TS2694: Namespace ‘android’ has no exported member ‘database’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(90,47): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(93,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(102,43): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(104,49): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(107,49): error TS2339: Property ‘os’ does not exist on type ‘typeof android’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(108,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(110,42): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(110,69): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(111,42): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(112,42): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(114,44): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(115,42): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(115,69): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(116,42): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(118,54): error TS2339: Property ‘widget’ does not exist on type ‘typeof android’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(119,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(123,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(125,35): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(126,51): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(127,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(127,99): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(128,46): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(129,62): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(129,89): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(129,114): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(130,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(131,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(131,99): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(132,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(132,83): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(134,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(167,61): error TS2339: Property ‘AppCompatDialog’ does not exist on type ‘typeof app’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(167,96): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(168,53): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(169,41): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(173,41): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(173,91): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(174,37): error TS2694: Namespace ‘android’ has no exported member ‘graphics’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(175,64): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(176,63): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(177,48): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(178,64): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(181,56): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(181,107): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(182,59): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(183,44): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(184,41): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(184,91): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(188,56): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(189,36): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(190,37): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(191,55): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(192,73): error TS2694: Namespace ‘android.support.v7.view’ has no exported member ‘ActionMode’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(194,55): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(195,75): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(196,56): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(196,91): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(197,49): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(197,83): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(197,110): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(198,60): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(199,46): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(201,71): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(202,38): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(204,56): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(205,50): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(206,71): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(207,49): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(208,37): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(209,52): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(211,79): error TS2694: Namespace ‘android.support.v7.view’ has no exported member ‘ActionMode’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(211,125): error TS2694: Namespace ‘android.support.v7.view’ has no exported member ‘ActionMode’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(212,72): error TS2694: Namespace ‘android.support.v7.view’ has no exported member ‘ActionMode’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(214,58): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(215,41): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(216,54): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(217,48): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(219,60): error TS2694: Namespace ‘android’ has no exported member ‘view’.

app/tns_modules/nativescript-telerik-ui/android.d.ts(219,87): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(223,38): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(224,38): error TS2694: Namespace ‘android’ has no exported member ‘graphics’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(225,64): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(226,63): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(228,45): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(229,42): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(229,86): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(229,125): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(231,55): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(232,64): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(233,64): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(234,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(235,51): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(236,40): error TS2694: Namespace ‘android’ has no exported member ‘database’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(236,73): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(237,51): error TS2694: Namespace ‘android’ has no exported member ‘database’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(237,116): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(240,31): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(240,83): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(241,51): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(241,103): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(242,63): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(244,42): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(245,56): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(247,38): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(248,41): error TS2694: Namespace ‘android’ has no exported member ‘widget’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(248,77): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(249,58): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(249,97): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(250,50): error TS2694: Namespace ‘android’ has no exported member ‘database’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(250,115): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(251,64): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(252,36): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(253,47): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(255,50): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(261,83): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(262,43): error TS2503: Cannot find namespace ‘native’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(262,111): error TS2694: Namespace ‘android’ has no exported member ‘content’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(284,74): error TS2551: Property ‘AppCompatDelegateImplV11’ does not exist on type ‘typeof app’. Did you mean ‘AppCompatDelegateImplV14’?
app/tns_modules/nativescript-telerik-ui/android.d.ts(285,49): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(286,38): error TS2694: Namespace ‘android’ has no exported member ‘os’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(289,98): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(295,77): error TS2551: Property ‘AppCompatDelegateImplBase’ does not exist on type ‘typeof app’. Did you mean ‘AppCompatDelegateImplV14’?
app/tns_modules/nativescript-telerik-ui/android.d.ts(296,53): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(298,61): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(298,88): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(299,51): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(300,56): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(303,60): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(305,59): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(306,57): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(306,92): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(307,64): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(308,49): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(309,57): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(310,57): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(310,108): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(312,55): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(313,57): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(314,65): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(316,50): error TS2694: Namespace ‘android’ has no exported member ‘view’.
app/tns_modules/nativescript-telerik-ui/android.d.ts(317,65): error TS2694: Namespace ‘android’ has no exported member ‘view’.

Failed during hook execution.
TypeScript compiler failed with exit code 1
Error: TypeScript compiler failed with exit code 1
at Errors.fail (/Users/michael/.nvm/versions/node/v7.9.0/lib/node_modules/nativescript/lib/common/errors.js:125:28)
at Errors.failWithoutHelp (/Users/michael/.nvm/versions/node/v7.9.0/lib/node_modules/nativescript/lib/common/errors.js:133:14)
at HooksService. (/Users/michael/.nvm/versions/node/v7.9.0/lib/node_modules/nativescript/lib/common/services/hooks-service.js:78:30)
at Generator.throw ()
at rejected (/Users/michael/.nvm/versions/node/v7.9.0/lib/node_modules/nativescript/lib/common/services/hooks-service.js:5:65)
at process._tickCallback (internal/process/next_tick.js:109:7)

May be you have an idea.

Thanks
Michael


#6

Hi @mkirbach,
Is there any way for you to provide a sample repo reproducing the problem?

By what is see: you have a problem with the android.d.ts you can download the latest platform declarations containing android.d.ts.
You can do that by installing: the platform declarations.

  • run npm i tns-platform-declarations --save-dev
  • create a reference file as described in the link Create reference.d.tsand add the following content: ...

About the angular .d.ts issues. Please make sure you have nativescript-angular@4.2.0 installed in the package.json and then delete the node_modules remove the platforms folder and run tns build ios again.


#7

Also,
please check if you have tns_modules in the <project_name>/app folder.
If there is, please remove it, delete <project_name>/platforms folder and rebuild the project.


#8

Hi @plamen5kov,

your last two replies plus one additional step solves my issue. Thank you so much for supporting me on that issue.

At the end the following steps leaded to a success:

  • Removing folders node_modules and platforms within the procect folder
  • Removing tns_modules folder from the procect app sub folder
  • npm i tns-platform-declarations --save-dev

After that, the tns build ios process gave me the following error:

Executing before-prepare hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /Users/michael/NativeScript-Projects/groceries/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.5.3
node_modules/rxjs/Subject.d.ts(16,22): error TS2415: Class ‘Subject’ incorrectly extends base class ‘Observable’.

This could be solved by:

npm install --save rxjs@^5.4.2

After that, the build went fine. However I still need to start the simulating device before tns run ios.

1st of all -> many thanks again!

But, the whole issue take so much of my time and really frustates me as far as I was close to quit the approach and use XCode instead. What would be needed to avoid these situations and push the framework further forward?
I would be really happy to support.

Thanks Michael


#9

Hi @mkirbach, I’m glad your issue is solved. You hit a really tricky problem described here:


You’ll be glad to know, we know what the issue is and it’s already fixed in CLIs master branch.

The problem you had with dependencies not being installed is caused by the fact npm v.3.x.x doesn’t install peerDependencies, but rather expects the user to install them, so this step has to be done manually.

To be fair, I don’t know what the best solution would be, but you helped with explaining the exact issue and providing us with information on what the users experience and what’s their flow. (e.g. do they use tns update command, using npm install or tns plugin add instead and so on). On the matter of how you can help improve that flow, the main tool users interact with, as you saw, is CLI. We’d be happy to receive PR’s from you, fixing any flow you believe is broken or can be done better. Something as simple as providing a more understandable error message or warming can go the extra mile.

I’m really happy to see you take such interest in NativeScript and it makes me proud to be part of the project.


#10

Hi @plamen5kov,

thank you for the detailed background information about the issue I had. This will definitely improve my knowledge of using the CLI and would give me some good ideas for handling issues in the future. I will try to give you as much feedback as possible in the future.

Keep being a very happy user and supporter of NativeScript.


#11

hi @plamen5kov,
I am facing the same problem as reported here.
I was working out of local build and deploying to a simulator. this one time, I had my iPad connected to my Mac, On running the ‘tns run iOS’ command, it tried to deploy the app to the iPad instead of the simulator. After which the ‘tns run ios --emulator’ & --device have stopped working, I get the message 'Unable to find applicable devices to execute operation. Ensure connected devices are trusted and try again.'
Can you please help me out.
Thanks,
Umais


#12

Hi @Umais, please provide a more detailed explanation of the problem, possibly with exact steps to reproduce, or open a new issue in the NativeScript repo


#13

hi @plamen5kov,
Got this resolved…
Firstly, thanks for the quick response.

I tried re-installing Xcode, turns out i also had a beta version of Xcode.
got this resolved by below
sudo xcode-select --switch /Applications/Xcode.app

Thanks,
Umais