I installed truffle through npm
with the following:
sudo npm install -g truffle
but when I run truffle list on the console it just gives me
bash: truffle: command not found
Open node. js command prompt and paste the following command in the prompt to install Truffle. After the download is complete, type “truffle version” on node terminal to verify that truffle is successfully installed.
If you'd like to configure a more advanced development environment we recommend you install the blockchain server separately by running npm install -g ganache at the command line. ganache: a command-line version of Truffle's blockchain server.
I was able to get truffle installed on Windows 10 by going one version older. Ran PS in Administrator mode (With Execution Policy set to "ByPass"). Hope this helps.
I had a similar problem. I ran npm i -g truffle
and then when I tried to run truffle init
I got an error: zsh: command not found: truffle
. What solved it for me is to create a local node_modules with truffle installed in it, and then run that copy.
npm init
and make a new npm projectnpm i truffle
./node_modules/.bin/truffle init
and it should work!If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With