在模拟器上打开Nativescript-vue应用程序错误

时间:2019-02-25 12:12:28

标签: android nativescript-vue

我有一个全新的nativescript-vue安装,当我运行tns时运行android --bundle,该应用程序已部署到android模拟器中,但出现此异常

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5743)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: com.tns.NativeScriptException: Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists.\nIf using typescript make sure your entry point file is transpiled to javascript.
    at com.tns.Module.bootstrapApp(Module.java:311)
    at com.tns.Runtime.run(Runtime.java:544)
    at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
    ... 8 more
Caused by: com.tns.NativeScriptException: Failed to find module: "./", relative to: app//
    at com.tns.Module.resolvePathHelper(Module.java:146)
    at com.tns.Module.bootstrapApp(Module.java:309)
    ... 12 more

这是我的package.json

{
  "name": "mobile",
  "version": "1.0.0",
  "description": "A native application built with NativeScript-Vue",
  "author": "Jimmy",
  "license": "MIT",
  "nativescript": {
    "id": "org.nativescript.application",
    "tns-ios": {
      "version": "5.0.0"
    },
    "tns-android": {
      "version": "5.0.0"
    }
  },
  "dependencies": {
    "vuex": "^3.0.1",
    "@vue/devtools": "5.0.0-beta.3",
    "nativescript-socket.io": "^0.9.0",
    "nativescript-vue-devtools": "^1.0.0",
    "nativescript-toast": "^1.4.6",
    "nativescript-ui-sidedrawer": "^4.3.0",
    "nativescript-theme-core": "^1.0.4",
    "nativescript-vue": "^2.0.0",
    "tns-core-modules": "^5.0.2"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "babel-loader": "^8.0.2",
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "clean-webpack-plugin": "^0.1.19",
    "copy-webpack-plugin": "^4.5.2",
    "css-loader": "^1.0.0",
    "lazy": "1.0.11",
    "nativescript-dev-webpack": "next",
    "nativescript-vue-template-compiler": "^2.0.0",
    "nativescript-worker-loader": "~0.9.0",
    "node-sass": "^4.9.2",
    "sass-loader": "^7.1.0",
    "terser-webpack-plugin": "^1.1.0",
    "vue-loader": "^15.2.6",
    "webpack": "^4.16.4",
    "webpack-bundle-analyzer": "~2.13.1",
    "webpack-cli": "^3.1.0"
  }
}

我已遵循完整的linux nativescript安装指南,而tns doctor显示我的安装没有问题。
我已经为此苦了一段时间。您的帮助将不胜感激。

0 个答案:

没有答案