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
Asked
Active
Viewed 691 times
0
-
Could you post the command you're trying and also a copy of said error message in aid of people attempting to help you diagnose the issue?Thanks in advance. – Will Webb Mar 08 '17 at 09:30
-
Thank you I have amended it. – Ahmed Hamadto Mar 08 '17 at 09:51
-
How did you install _truffle_ and _testrpc_, was this through chocolatey?When you say you previously had them installed, how long ago? – Will Webb Mar 08 '17 at 10:01
-
Yes I installed them through chocolatey via powershell. – Ahmed Hamadto Mar 09 '17 at 02:17
-
Correction I installed them via npm not choco, I installed nodejs ,git and visual studio code via choco. – Ahmed Hamadto Mar 09 '17 at 03:50
1 Answers
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