我安装了Geth来使用Web3并使用了npm install -g ethereumjs-testrpc,但是当我运行testrpc时,下面的错误显示了
testrpc is not recognized as an internal or external command,operable program or batch file.
是否有任何额外的包或东西,我应该使用使这一工作?
发布于 2018-09-28 08:09:35
在npm文档中,testrpc包已经被废弃,并被移动到ganache中。我的建议是用这个代替。但是,如果要使用test rpc,则使用以下命令
geth --rpc来设置它。当然,最好还是检查一下您是否有最新的geth版本,以防它不起作用,但到目前为止,我一直在测试中使用它,它运行得完美无缺。
发布于 2018-09-28 10:02:14
此包已被废弃为https://www.npmjs.com/package/ethereumjs-testrpc。
ethereumjs-testrpc已经改名为ganache-cli,最好使用新的。
如果您再次面临这个问题,请确保环境变量包含到C:\Users\<user>\AppData\Roaming\npm的路径
https://ethereum.stackexchange.com/questions/59568
复制相似问题