Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

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

1 Answer

0 votes
by (14.4k points)

If you are getting this error, you must ensure that the latest versions of node and NPS are installed in your system. Once you install the latest versions, the above-mentioned code should work just fine as it is correct syntactically. 

If the problem still persists, you can restart your computer and try running the code again. 

And if again you encounter the same error, create local node_modules with truffle installed on them. Then execute those copies.

Browse Categories