我试图运行nativescript的OpenPGP的图书馆利用其加密后,我设法安装和运行它,当我尝试使用它,我有这样的错误
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ERROR Error: Uncaught (in promise): Error: com.tns.NativeScriptException: Failed to find module: "crypto", relative to: app/tns_modules/
我的package.json有这么
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/http": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"@mattiasbuelens/web-streams-polyfill": "^0.3.2",
"address-rfc2822": "^2.0.4",
"asmcrypto.js": "^2.3.2",
"asn1.js": "^5.0.1",
"bn.js": "^4.11.8",
"browserify-derequire": "^1.0.0",
"buffer": "^5.2.1",
"compressjs": "^1.0.3",
"crypto-js": "^3.1.9-1",
"elliptic": "^6.4.1",
"hash.js": "^1.1.7",
"nativescript-angular": "^7.2.3",
"nativescript-localstorage": "^2.0.0",
"nativescript-nodeify": "^0.8.0",
"nativescript-theme-core": "~1.0.4",
"node-fetch": "^2.3.0",
"node-localstorage": "^1.3.1",
"openpgp": "^4.4.10",
"reflect-metadata": "~0.1.12",
"rusha": "^0.8.13",
"rxjs": "~6.3.0",
"rxjs-compat": "^6.4.0",
"tns-core-modules": "^5.4.0-next-2019-03-29-153458-02",
"web-stream-tools": "0.0.1",
"zone.js": "~0.8.26"
}
如果任何人知道的东西,请你能告诉我,如果你知道如何使用本地脚本开放PGP库,将是非常有益的