简体   繁体   English

如何安装松露

[英]How to install Truffle

I was stuck when I install truffle to my Mac PC. 将松露安装到Mac PC时,我陷入了困境。 I tried to install it with npm install -g truffle and it worked after I made a folder for global install. 我尝试使用npm install -g truffle ,并且在为全局安装创建了文件夹之后,它可以工作。 However, when I try to run Truffle 但是,当我尝试运行松露

truffle init

it returns -bash: truffle: command not found I also reinstall it and run it again but nothing was changed. 它返回-bash: truffle: command not found我也重新安装了它并再次运行它,但是什么都没有改变。 在此处输入图片说明

How can I deal with this issue ? 我该如何处理? It would be really appreciated if you explained in detail. 如果您详细解释,将不胜感激。

I think on windows you are suppose to use truffle.cmd instead of truffle. 我认为您应该在Windows上使用truffle.cmd而不是truffle。

So try, 所以尝试一下

truffle.cmd init

Keeping in mind that truffle init is depreciated so you should try using 请记住,松露init已贬值,因此您应该尝试使用

truffle.cmd unbox metacoin
You can reinstall it by this commands 

     npm uninstall -g truffle 

Install it by 安装方式

     npm install -f truffle 

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM