当我尝试使用Sidekick构建NS应用程序时,出现以下错误:
[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:
{
"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。
谢谢。
答案 0 :(得分:0)
我不知道原因,但是在删除了node_modules,钩子,删除了两个平台并重新添加它们之后,突然一切恢复正常。
似乎有时项目会产生一些内部冲突,并清理所有内容并开始新的工作。