Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Don';不要在Nativescript中使用npm-Orientjs_Npm_Nativescript - Fatal编程技术网

Don';不要在Nativescript中使用npm-Orientjs

Don';不要在Nativescript中使用npm-Orientjs,npm,nativescript,Npm,Nativescript,我正在使用nativescript构建android应用程序,并在主页上使用数据库是Orientdb。我正在尝试连接Nativescript中的orientdb,在主页上使用npm Orientjs,但出现错误。以下是安装过程: 步骤1:我使用命令npm install orientjs--save 下面是package.json中的代码 { "nativescript": { "id": "org.nativescript.KerryExpressDelivery", "t

我正在使用nativescript构建android应用程序,并在主页上使用数据库是Orientdb。我正在尝试连接Nativescript中的orientdb,在主页上使用npm Orientjs,但出现错误。以下是安装过程:
步骤1:我使用命令
npm install orientjs--save
下面是package.json中的代码

{
  "nativescript": {
    "id": "org.nativescript.KerryExpressDelivery",
    "tns-android": {
      "version": "1.7.1"
    }
  },
  "dependencies": {
    "orientjs": "^2.1.11",
    "tns-core-modules": "1.7.1"
  }
}
步骤2:我使用命令var orientDb=require(“orientjs”)在file.js中,但在emulator中生成应用程序时,出现错误

com.tns.NativeScriptException: Failed to find module: "net", relative to: /app/tns_modules/
    at com.tns.Module.resolvePathHelper(Module.java:220)
    at com.tns.Module.resolvePath(Module.java:60)
    at com.tns.Platform.callJSMethodNative(Native Method)
    at com.tns.Platform.dispatchCallJSMethodNative(Platform.java:816)
    at com.tns.Platform.callJSMethod(Platform.java:715)
    at com.tns.Platform.callJSMethod(Platform.java:694)
    at com.tns.Platform.callJSMethod(Platform.java:684)
    at com.tns.gen.android.view.View_OnClickListener_ftns_modules_ui_button_button_l19_c42__.onClick(android.view.View$OnClickListener.java)
    at android.view.View.performClick(View.java:4438)
    at android.view.View$PerformClick.run(View.java:18422)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5001)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.

这可能是因为OrientDB使用了其他一些在NativeScript中不起作用的节点模块。尽管{N}是基于JS的,但并非所有的npm模块都是现成的。依赖浏览器或节点对象的NPM模块将无法工作

这可能是因为OrientDB使用了其他一些在NativeScript中不起作用的节点模块。尽管{N}是基于JS的,但并非所有的npm模块都是现成的。依赖浏览器或节点对象的NPM模块将无法工作