Nativescript错误:版本字符串的格式不同

时间:2017-03-12 12:36:20

标签: telerik nativescript

我刚刚在我的macOS Sierra 10.12.12上安装了Nativescript。但是当我输入命令时:tns platfrom add ios我收到以下错误消息:

*Version strings are not in the same format*

*#platform add*

当我为Android输入相同的命令时,一切正常。

医生给了我以下反馈:

*Your components are up-to-date.*

*No issues were detected.*

记录跟踪:

ns platform add ios --log trace> log.txt的 错误:版本字符串的格式不同 at Object.versionCompare(/usr/local/lib/node_modules/nativescript/lib/common/helpers.js:111:15) at /usr/local/lib/node_modules/nativescript/lib/services/ios-project-service.js:92:25 在Function.settle(/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26) 在FiberFuture.wait(/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:565:10) 在/usr/local/lib/node_modules/nativescript/lib/services/platform-service.js:69:47 在Function.settle(/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26) 在FiberFuture.wait(/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:565:10) at .each.platform(/usr/local/lib/nodemodules/nativescript/lib/services/platform-service.js:55:58) 在arrayEach(/usr/local/lib/node_modules/nativescript/node_modules/lodash/lodash.js:451:11) 在Function.forEach(/usr/local/lib/node_modules/nativescript/node_modules/lodash/lodash.js:8634:14)

1 个答案:

答案 0 :(得分:0)

@Brad Martin 这是我的package.json文件:

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.HelloWorld",
    "nativescript-teststudio-variables": {
      "IOS_APP_URL": "telerikmt1"
    },
    "tns-android": {
      "version": "2.5.0"
    }
  },
  "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",
    "nativescript-angular": "1.4.0",
    "nativescript-teststudio": "^1.1.4",
    "nativescript-theme-core": "~1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.0.1",
    "tns-core-modules": "^2.5.1"
  },
  "devDependencies": {
    "babel-traverse": "6.23.1",
    "babel-types": "6.23.0",
    "babylon": "6.16.1",
    "lazy": "1.0.11",
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-typescript": "^0.3.5",
    "typescript": "~2.1.0",
    "zone.js": "~0.7.2"
  }
}