无法解析本机UI组件

时间:2018-06-27 11:49:32

标签: nativescript nativescript-angular

tns --version:4.1.0

tns创建演示--ng

为nativescript-webpack更新package.json

{
      "description": "NativeScript Application",
      "license": "SEE LICENSE IN <your-license-filename>",
      "readme": "NativeScript Application",
      "repository": "<fill-your-repository-here>",
      "nativescript": {
        "id": "org.nativescript.test",
        "tns-android": {
          "version": "4.1.3"
        }
      },
      "dependencies": {
        "@angular/animations": "~6.0.6",
        "@angular/common": "~6.0.6",
        "@angular/compiler": "~6.0.6",
        "@angular/core": "~6.0.6",
        "@angular/forms": "~6.0.6",
        "@angular/http": "~6.0.6",
        "@angular/platform-browser": "~6.0.6",
        "@angular/platform-browser-dynamic": "~6.0.6",
        "@angular/router": "~6.0.6",
        "nativescript-angular": "~6.0.0",
        "nativescript-theme-core": "~1.0.4",
        "reflect-metadata": "~0.1.8",
        "rxjs": "~6.0.0 || >=6.1.0",
        "tns-core-modules": "~4.1.0",
        "zone.js": "^0.8.26"
      },
      "devDependencies": {
        "@angular-devkit/build-angular": "~0.7.0-rc.0",
        "@angular/compiler-cli": "~6.1.0-beta.1",
        "@ngtools/webpack": "^6.0.8",
        "babel-traverse": "6.4.5",
        "babel-types": "6.4.5",
        "babylon": "6.4.5",
        "clean-webpack-plugin": "~0.1.19",
        "copy-webpack-plugin": "~4.5.2",
        "lazy": "1.0.11",
        "nativescript-dev-typescript": "~0.7.0",
        "nativescript-dev-webpack": "^0.14.2",
        "tns-platform-declarations": "^4.1.0",
        "typescript": "~2.7.2",
        "webpack-bundle-analyzer": "^2.13.1"
      }
    }

./ node_modules / .bin / update-ns-webpack --configs

tns构建android --bundle

发生许多错误,如下所示:

../ node_modules / tns-core-modules / bundle-entry-points.js中的错误 找不到模块:错误:无法解析“ ui / button”

1 个答案:

答案 0 :(得分:0)

0.14.1的“ nativescript-dev-webpack”工作正常。