0

当我将松露安装到我的 Mac PC 时,我被卡住了。我尝试安装它,npm install -g truffle并且在我为全局安装创建一个文件夹后它工作。但是,当我尝试运行 Truffle

truffle init

它返回-bash: truffle: command not found 我也重新安装并再次运行它,但没有任何改变。 在此处输入图像描述

我该如何处理这个问题?如果您详细解释,将不胜感激。

4

2 回答 2

2

我认为在 Windows 上你应该使用 truffle.cmd 而不是 truffle。

所以试试,

truffle.cmd init

请记住 truffle init 已贬值,因此您应该尝试使用

truffle.cmd unbox metacoin
于 2018-10-10T18:19:39.460 回答
1
You can reinstall it by this commands 

     npm uninstall -g truffle 

安装它

     npm install -f truffle 

谢谢

于 2018-11-01T05:29:43.437 回答