I installed ethereumjs library using following command:
npm i ethereumjs-testrpc
And here is the output:
And then I tried to run an html example which uses ethereumjs-vm. The example is here :
https://github.com/ethereumjs/browser-builds/blob/master/examples/vm.html
However, when I open this html file, there is an error message :
ethereumjs is not defined.
Here is screen shot:
Does it mean that I need to modigy following directory in the html file ?
<script src="../dist/ethereumjs-vm/ethereumjs-vm-2.3.1.js"></script>
Note: My main purpose is to run successfully JavaScript code presented HERE . When I run it using node I receive some errors. What is the best way of running this JavaScript code? Do I need to create an html file and run it with browser? or it's better to create a JavaScript file and run it using node filename.js ? The problem with running this code that is for signature verification is explained in details HERE . Eventually, I had to change some part of JavaScript code (I precised which parts have been changed in my question HERE ). However, eventually, when I call the function of Solidity contract (i.e. function close) to verify signature, the transaction is reverted as I mentioned the details of error HERE.


npm install ethereumjs-testrpc -g. However, this is generally not recommended. The correct way is to ensure that you execute your client code from the same path in which you have installed thenpmpackage locally. – goodvibration Jul 19 '18 at 18:44ethereumjs-vmin my computer, no result. My main purpose is to run successfully JavaScript code presented here: https://programtheblockchain.com/posts/2018/02/23/writing-a-simple-payment-channel/ when i run it usingnodei receive some errors. Do you know what is the best way of running this JS code ? Do i need to create anhtmlfile and run it with browser? or it's better to create aJSfile and run it usingnode filename.js? Thanks – Questioner Jul 22 '18 at 12:31