首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Nativescript Sidekick构建错误Android

Nativescript Sidekick构建错误Android
EN

Stack Overflow用户
提问于 2018-08-01 01:05:30
回答 1查看 169关注 0票数 0

当我尝试使用Sidekick构建NS应用程序时,我得到了以下错误:

代码语言:javascript
复制
[18-07-31 08:06:59.535] (CLI) Command npm install tns-android@3.4.0 --silent --save-exact --save failed with exit code 1 Error output: 
[18-07-31 08:06:59.535] (CLI)  Unhandled rejection Error: Integrity check failed:
[18-07-31 08:06:59.535] (CLI)   Wanted: sha512-UGlRKABh3ZZnhZq8hKc19NIkWNiFpuKNri8fMOjuV6h6qsVVf+ua3g3JqUJoufkZo95yhERjTBa8nkV3RY3g+g==
[18-07-31 08:06:59.535] (CLI)    Found: sha512-zX507Sx/iLCoCgqUwF9e9HtFzot1piqis7SEQQQy9TxNBkd4KdRd+74vw9YjGb51QMKHdOOHYkC3q+9XtU7fNw==
[18-07-31 08:06:59.535] (CLI)     at checksumError (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:155:13)
[18-07-31 08:06:59.535] (CLI)     at write (/usr/lib/node_modules/npm/node_modules/cacache/lib/content/write.js:33:22)
[18-07-31 08:06:59.535] (CLI)     at putData (/usr/lib/node_modules/npm/node_modules/cacache/put.js:11:10)
[18-07-31 08:06:59.535] (CLI)     at Object.x.put (/usr/lib/node_modules/npm/node_modules/cacache/locales/en.js:28:37)
[18-07-31 08:06:59.535] (CLI)     at readFileAsync.then.data (/usr/lib/node_modules/npm/node_modules/pacote/lib/fetchers/file.js:38:28)
[18-07-31 08:06:59.535] (CLI)     at tryCatcher (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
[18-07-31 08:06:59.535] (CLI)     at Promise._settlePromiseFromHandler (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
[18-07-31 08:06:59.535] (CLI)     at Promise._settlePromise (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
[18-07-31 08:06:59.535] (CLI)     at Promise._settlePromise0 (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
[18-07-31 08:06:59.535] (CLI)     at Promise._settlePromises (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
[18-07-31 08:06:59.535] (CLI)     at Promise._fulfill (/usr/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:638:18)
[18-07-31 08:06:59.535] (CLI)     at /usr/lib/node_modules/npm/node_modules/bluebird/js/release/nodeback.js:42:21
[18-07-31 08:06:59.535] (CLI)     at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
[18-07-31 08:06:59.535] (CLI)     at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
[18-07-31 08:07:00.969] (CLI) bc_BnGC7LDWhYFdbMASM3
[18-07-31 08:07:06.156] Build failed.

我可以使用VS Code在本地构建,但云构建失败。下面是我的package.json:

代码语言:javascript
复制
{
  "name": "myapp",
  "version": "3.0.0",
  "description": "",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.company.myapp",
    "tns-android": {
      "version": "3.4.0"
    },
    "tns-ios": {
      "version": "3.4.0"
    }
  },
  "dependencies": {
    "moment": "2.20.1",
    "moment-timezone": "0.5.14",
    "nativescript-appversion": "1.4.1",
    "nativescript-zendesk": "file:nativescript-zendesk-1.0.0.tgz",
    "nativescript-email": "1.5.1",
    "nativescript-exit": "1.0.1",
    "nativescript-fingerprint-auth": "6.0.3",
    "nativescript-iqkeyboardmanager": "1.2.0",
    "nativescript-loading-indicator": "2.4.0",
    "nativescript-masked-text-field": "2.0.2",
    "nativescript-numeric-keyboard": "3.0.3",
    "nativescript-pdf-view": "2.0.1",
    "nativescript-phone": "1.3.1",
    "nativescript-push-notifications": "1.1.3",
    "nativescript-theme-core": "1.0.4",
    "nativescript-ui-calendar": "^3.5.1",
    "nativescript-zendesk-with-chat": "0.2.0",
    "tns-core-modules": "^3.4.0"
  },
  "devDependencies": {
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "0.5.1",
    "tns-platform-declarations": "^3.4.0",
    "typescript": "2.5.3"
  }
}

我找不到有关此错误的任何信息。任何帮助都将不胜感激。

编辑:我尝试删除和添加android平台,但得到了相同的错误。

我还打开了一个问题here

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2018-08-02 21:36:25

我不知道为什么会这样,但在移除node_modules、钩子、移除两个平台并重新添加它们之后,突然一切都正常了。

似乎有时项目会产生一些内部冲突,清理一切并开始新的工作。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51618664

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档