2017-07-18 50 views
2

完成步驟「git clone ...」,「startFabric.sh」和「npm.install」,沒有錯誤。 「節點query.js」導致:hyperledger-fabric「編寫你的第一個應用程序」query.js步驟失敗

Set wallet path, and associate user PeerAdmin with application 
    error: [Client.js]: Failed to load user "PeerAdmin" from local key value store. Error: TypeError: this is not a typed array. 
     at Function.from (native) 
     at importKey (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26) 
     at fromString (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28) 
     at /home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22 
    error: [Client.js]: Failed to load an instance of requested user "PeerAdmin" from the state store on this Client instance. Error: TypeError: this is not a typed array. 
     at Function.from (native) 
     at importKey (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js:180:26) 
     at fromString (/home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/User.js:228:28) 
     at /home/peter/fabric-samples/fabcar/node_modules/fabric-client/lib/Client.js:968:22 
    Caught Error [TypeError: this is not a typed array.] 

注:git的克隆步驟之後,存在織物樣品作爲在docs指出/ fabcar中沒有「chaincode」,但有一個chaincode/fabcar在織物樣品。這似乎不會導致問題。 注意:「構建您的第一個網絡」中的所有步驟都完全沒有問題。

+0

彼得,謝謝你的提問。你能否提供關於你的環境的額外信息?你正在運行什麼版本的節點?哪個操作系統和哪個版本?我剛剛跑了fabcar樣本沒有問題。 – christo4ferris

+0

節點4.2.6,npm 3.10.10,在ubuntu上運行xenial –

+0

安裝節點版本6.11.1並重新運行。新錯誤: –

回答

2

Hyperledger Fabric 1.0已經過針對Node.js版本> = 6.9和< 7.x的測試。如果出現類似的錯誤,建議更新Node.js的版本(或使用版本管理器,如nvm)並重新嘗試。如果您已使用舊版本的節點運行npm install,則應刪除node_modules樹並重新運行npm install以確保安裝正確的依賴關係。

相關問題