Nativescript无法构建 - v3

时间:2017-05-01 23:51:20

标签: angular firebase nativescript

已更新至v3并收到以下错误:

1   0x10236e2ac -[TNSRuntime executeModule:referredBy:]
2   0x1003c2f69 main
3   0x105c7a65d start
4   0x1
file:///app/tns_modules/nativescript-angular/view-util.js:6:35: JS ERROR Error: Could not find module 'ui/builder/special
-properties'. Computed path '/Users/ryan/Library/Developer/CoreSimulator/Devices/6C9C5877-3A00-4DA9-8BA8-B540F163DDB1/dat
a/Containers/Bundle/Application/7853D13C-4A8C-4AF9-B98B-D6654352CFCF/mobile.app/app/tns_modules/ui/builder/special-proper
ties'.
May  1 18:23:16 Ryans-MBP com.apple.CoreSimulator.SimDevice.6C9C5877-3A00-4DA9-8BA8-B540F163DDB1.launchd_sim[1164] (UIKit
Application:org.nativescript.plantpoweredcommunity[0x6191][1186][2438]): Service exited due to Segmentation fault: 11
6:23:16 PM - Compilation complete. Watching for file changes.

的package.json

{
  "name": "plant-powered-community",
  "version": "0.0.1",
  "description": "Plant Powered Community Application",
  "license": "MIT",
  "readme": "Plant Powered Community Application",
  "repository": "<fill-your-repository-here>",
  "scripts": {
    "start": "tns run android --emulator",
    "start-geny": "tns run android --emulator --geny=\"DEVICE_NAME_HERE\"",
    "android-path": "export 'ANDROID_HOME=/Users/ryan/Library/Android/sdk' >> ~/.bash_profile",
    "doctor": "tns doctor",
    "build:android": "tns build android",
    "build:ios": "tns build ios",
    "config-firebase": "cd node_modules/nativescript-plugin-firebase && npm run config",
    "ns-bundle": "ns-bundle",
    "start-android-bundle": "npm run ns-bundle --android --start-app",
    "start-ios-bundle": "npm run ns-bundle --ios --start-app",
    "build-android-bundle": "npm run ns-bundle --android --build-app",
    "build-ios-bundle": "npm run ns-bundle --ios --build-app"
  },
  "nativescript": {
    "id": "org.nativescript.plantpoweredcommunity",
    "tns-ios": {
      "version": "3.0.0-rc.2"
    },
    "tns-android": {
      "version": "3.0.0-rc.2"
    }
  },
  "dependencies": {
    "@angular/common": "4.1.0",
    "@angular/compiler": "4.1.0",
    "@angular/core": "4.1.0",
    "@angular/forms": "4.1.0",
    "@angular/http": "4.1.0",
    "@angular/platform-browser": "4.1.0",
    "@angular/platform-browser-dynamic": "4.1.0",
    "@angular/router": "4.1.0",
    "@ngrx/core": "1.2.0",
    "@ngrx/effects": "2.0.3",
    "@ngrx/router-store": "1.2.6",
    "@ngrx/store": "2.2.2",
    "@ngrx/store-devtools": "3.2.4",
    "nativescript-angular": "1.5.2",
    "nativescript-plugin-firebase": "3.11.4",
    "nativescript-theme-core": "1.0.3",
    "ngrx-store-freeze": "0.1.9",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.3.0",
    "tns-core-modules": "3.0.0-rc.2",
    "zone.js": "0.8.5"
  },
  "devDependencies": {
    "babel-traverse": "6.24.1",
    "babel-types": "6.24.1",
    "babylon": "6.17.0",
    "lazy": "1.0.11",
    "nativescript-dev-android-snapshot": "0.0.8",
    "nativescript-dev-typescript": "0.4.2",
    "nativescript-dev-webpack": "0.4.1",
    "typescript": "2.3.2",
    "webpack": "2.2.0",
    "webpack-sources": "0.2.3",
    "copy-webpack-plugin": "4.0.1",
    "raw-loader": "0.5.1",
    "nativescript-css-loader": "0.26.1",
    "resolve-url-loader": "2.0.2",
    "extract-text-webpack-plugin": "2.1.0",
    "@angular/compiler-cli": "4.1.0",
    "@ngtools/webpack": "1.2.10",
    "htmlparser2": "3.9.2"
  }
}

1 个答案:

答案 0 :(得分:0)

刚刚在干净的项目中遇到困难,我猜他们需要优化项目附带的package.json,因为它无法运行。

我跟踪了tns-core-modules的问题并在github上发现了这个问题,导致我只更新了我的package.json版本ov nativescript-angular到最新的v3 "nativescript-angular": "3.0.0",

我在这里找到了与我的比较的例子:https://github.com/NativeScript/NativeScript/issues/4113

我把所有其他内容保留原样并且应用程序正在构建。请让我知道这对你有没有用。 达沃尔