0

I was installing some modules/packages needed for Ethereum development and I previously installed truffle and testrpc, and I could run them fine from PowerShell. I am now suddenly unable to run either as it says 'testrpc' is not recognised as a cmdlet, and 'truffle' is not recognised as a cmdlet. I would appreciate some help on how/why this happened and how to fix it. I also tried restarting my device but that did not help. Error produced when I run the script/command

Ahmed Hamadto
  • 15
  • 1
  • 7

1 Answers1

0

If it was working alright previously, uninstalling and reinstalling truffle should work. npm uninstall -g truffle npm install -g truffle

In case this does not work, below will work.

run npm init #this will make a new npm project particularly package.json
run npm i truffle #this will download node modules 
run ./node_modules/.bin/truffle init #this will create a truffle project
Nikhil
  • 1