Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh: command not found: truffle

I have install: npm install -g truffle

Node version: v10.20.1

NPM version: 6.14.4 After installing npm install -g truffle, it gets install successfully, but when I checked

truffle version

it shows me ,command not found truffle

like image 509
aksh Avatar asked Jan 02 '26 02:01

aksh


1 Answers

Try running truffle version in the same console you did the npm install -g truffle If it works on that terminal but not in new ones it means that the npm is not configured to be persistent across your sessions.

Here is an example of how to enable npm in other sessions.

https://gist.github.com/rcugut/c7abd2a425bb65da3c61d8341cd4b02d#addappend-the-following-lines-in-bashrc

like image 187
ccolorado Avatar answered Jan 06 '26 11:01

ccolorado



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!