0

我已经在对等体上安装了链码,它工作正常,在实例化链码时,我收到了下面提到的错误。(在 ec2 实例上工作)


Error: could not assemble transaction, err Proposal response was not successful, error code 500, msg failed to execute transaction 2914d25b521335397aa17cf83bdaba7e67189e56f5c31cfe2d9da88d82a39714: error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/@ampretia%2fx509 failed: cache mode is 'only-if-cached' but no cached response available.
4

1 回答 1

0

我找到了解决方案,我正在使用 AWS Managed Blockchain Service(版本 1.2),我使用的是 shim api 1.4 版本,它正在尝试安装升级的依赖项(附加 npm 包)。目前它不支持在链码中安装 npm 包。因此,您可以查看我的package.json文件以供参考并坚持下去,不要添加最终会失败的额外 npm 包。

{
    "name": "vista",
    "version": "0.0.1",
    "description": "sample chaincode",
    "engines": {
        "node": ">=8.4.0",
        "npm": ">=5.3.0"
    },
    "scripts": {
        "start": "node vista.js"
    },
    "engine-strict": true,
    "license": "Apache-2.0",
    "dependencies": {
        "fabric-shim": "1.2.0"
    }
} 
于 2019-09-02T13:05:44.210 回答