[Ethereum] Unable to install Truffle – Command Not Found

trufflewindows

I am unable to install Truflle on my Windows 10. I am running latest versions of npm and node. I have tried uninstalling and then reinstalling but it still doesn't work.

I have installed Truffle using the command

npm install -g truffle

Here is the Screenshot

error image

Best Answer

Had a simmilar problem when i tried to nstall npm i -g truffle and a restart worked for me. If your truffle is a fresh install, try restarting your PC (the path to truffle will now be in your environment variables). If that does not do the trick, you can always create a local node_modules with truffle installed in it, and then run that copy.

  1. run npm init and make a new npm project
  2. run npm i truffle
  3. run ./node_modules/.bin/truffle init and it should work!