1

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

  • 3
    I'm voting to close this question as off-topic because it is a general javascript problem. – niksmac Mar 15 '18 at 5:23
  • Should I ask it on SO? – Rohn Mar 15 '18 at 8:29
  • Does it works if called from the cmd shell (as truffle.cmd)? Is C:\Users\<user>\AppData\Roaming\npm in your Path environment variable? – Ismael Mar 15 '18 at 16:55
0

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!
0

You need to update your version of Node.js.. I was having the same problem until I reinstalled Node. This will also update NPM.

0

Make sure that the powershell window you use has ADMIN rights, then run the following commands in order:

npm install -g npm
npm install -g -production windows-build-tools
npm install -g ethereumjs-testrpc
npm install -g truffle

NOTE: ADMIN powershell: Shift+RightClick over the Powershell icon => Run as Administrator.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.