EatTheBlocks Forum

Profitable Flashloans lesson 12


I’m trying to listen to new blocks, but Terminal is giving me this error. Any idea what I’ve done wrong and how to fix it? Screenshot of my code editor attached.

transmutationist@Transmutationist ~ % node run-arbitrage.js
throw err;

Error: Cannot find module ‘/Users/transmutationist/run-arbitrage.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
requireStack: []


Discovered the answer, with the kind help of a fellow EatTheBlocks member on Discord. If you have this problem, it’s because you need to run your node installs in the correct folders.

Think of each folder as it’s own project, so installs need to be in the relevant folder / project, in order for code you run to be able to call on those installed files.

To do this, use your code editor and open the file (project) you are working on. Next, open the terminal that’s built into the code editor and run your installs there.

Hope this helps other coding n00bs like me!


Thanks for your input :slight_smile: