question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot destructure property 'version' of 'this.$projectDataService.getRuntimePackage(...)' as it is undefined.

See original GitHub issue

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.0.8
  • Cross-platform modules: “@nativescript/angular”: “10.0.0”
  • Android Runtime: -
  • iOS Runtime: “@nativescript/ios”: “7.0.0”
  • Plugin(s): nativescript-ui-listview, nativescript-ui-sidedrawer

xCode12 / NS7 / Angular10

Describe the bug

App after upgrade NativeScript to v7 and Angular to v10, works perfect when building in debug mode - on emulator and on real iOS device. But when pushing app to TestFlight it is Crashing just after run. So I tried to run on emulator in release mode:

tns run ios --release --clean --emulator

And just after searching for devices I see an error:

Cannot destructure property ‘version’ of ‘this.$projectDataService.getRuntimePackage(…)’ as it is undefined.

tns run ios (without release parameter) works, app builded and working well on emulator.

To Reproduce

tns run ios --release --clean --emulator

Expected behavior

expected to work in release mode and on test flight

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
farfromrefugcommented, Sep 25, 2020

@BlueHunter99 right now you can edit nativescript/cliservices/project-data-service.js . You need to find where it is installed on your computer. Open it then look for getInstalledRuntimePackage function. add this line at the begining of the method:

platform = platform.toLowerCase();

It should work now

1reaction
jwrascoecommented, Oct 2, 2020

@mreall use find on the command line… sudo find / -name project-data-service.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Your Answer - Stack Overflow
Cannot destructure property 'version' of 'this.$projectDataService.getRuntimePackage(...)' as it is undefined. NativeScript 7 + Angular 10.
Read more >
TypeError: Cannot destructure property '…' of 'Object ...
ReactJS Pass Functions through Context — TypeError: Cannot destructure property '…' of 'Object(…)(…)' as it is undefined. · Real reason of failure:.
Read more >
Cannot destructure Property of Undefined Error in JS
The "Cannot destructure property of undefined" error occurs when we try to destructure a property from a value that is equal to `undefined`....
Read more >
Basic object destructuring - Execute Program
TypeError : Cannot destructure property 'name' of 'undefined' as it is undefined. If the property doesn't exist in the object, we'll get undefined...
Read more >
Cannot destructure property 'base' of 'manifests.legacy' as it is ...
Oracle Commerce Cloud Service - Version 21.2.12 and later: [OSF] Error "TypeError: Cannot destructure property 'base' of 'manifests.legacy' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found