这是每次运行时出现的错误:node enrollAdmin.js
node enrollAdmin.js
module.js:328
throw err;
^
Error: Cannot find module 'fabric-client'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/patrick/fabric-
samples/fabcar/enrollAdmin.js:11:21)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
答案 0 :(得分:0)
听起来你还没有下载依赖项。在您的npm install
目录中运行命令fabric-samples/fabrcar
。这将下载您需要的node_modules。
这篇关于fabcar的文章可能会有所帮助:https://medium.com/@grsind19/hyperledger-development-with-in-21-days-day-3-fd24c30f4e54