3

We are building a NativeScript application and it stopped starting wiht the following error:

Processing node_modules failed. TypeError: Cannot read property 'version' of undefined

nodejs version is 6.10, and the same error are on 7.6

Package.json

{
  "description": "Mapporia",
  "version": "0.0.1",
  "author": "PanonicIT",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "Mapporia",

  "dependencies": {
    "@angular/common": "2.4.3",
    "@angular/compiler": "2.4.3",
    "@angular/core": "2.4.3",
    "@angular/forms": "2.4.3",
    "@angular/http": "2.4.3",
    "@angular/platform-browser": "2.4.3",
    "@angular/platform-browser-dynamic": "2.4.3",
    "@angular/router": "3.4.3",
    "crypto-js": "^3.1.9-1",
    "email-validator": "^1.0.7",
    "nativescript-angular": "1.4.0",
    "nativescript-oauth": "^1.3.0",
    "nativescript-theme-core": "~1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.0.1",
    "tns-core-modules": "2.5.1"
  },
  "devDependencies": {
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-typescript": "~0.3.5",
    "typescript": "~2.1.0",
    "zone.js": "~0.7.2"
  }
}

Any idea? thnx

1
  • 2
    It helped me to remove android platform and reinstall Commented Feb 28, 2017 at 16:56

1 Answer 1

3

I had the same problem, when I add a new nativescript plugin to my project:

Successfully installed plugin nativescript-screen-orientation.
TypeError: Cannot read property 'version' of undefined

Like @wasyster said in his comment, removing android platform solve the problem:

tns platform remove android
tns platform add android
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.