0

我正在安装以太坊开发所需的一些模块/包,并且我之前安装了 truffle 和 testrpc,我可以从 PowerShell 很好地运行它们。我现在突然无法运行,因为它说“testrpc”未被识别为 cmdlet,“truffle”未被识别为 cmdlet。我将不胜感激有关如何/为什么发生这种情况以及如何解决它的帮助。我也尝试重新启动我的设备,但这没有帮助。 运行脚本/命令时产生错误

4

1 回答 1

0

如果它以前工作正常,卸载并重新安装 truffle 应该可以工作。npm 卸载 -g 松露 npm 安装 -g 松露

如果这不起作用,下面将起作用。

run npm init #this will make a new npm project particularly package.json
run npm i truffle #this will download node modules 
run ./node_modules/.bin/truffle init #this will create a truffle project
于 2017-12-27T01:23:19.160 回答