从PowerShell运行Testrpc和松露不起作用

问题描述 投票:0回答:1

我正在安装以太网开发所需的一些模块/包,之前我安装了truffle和testrpc,我可以从PowerShell中运行它们。我现在突然无法运行,因为它说“testrpc”未被识别为cmdlet,并且“truffle”未被识别为cmdlet。我会很感激有关如何/为何如此发生以及如何解决它的一些帮助。我也试过重启我的设备,但这没有帮助。 Error produced when I run the script/command

powershell ethereum truffle consensys-truffle
1个回答
0
投票

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

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

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
© www.soinside.com 2019 - 2024. All rights reserved.