JavaScript Asynchronous Programming with JavaScript Understanding Promises Reject a Promise and Handle Errors

terminal error

When I run the code in the terminal it gives me a bunch of error node promises-breakfast.js

Error: Cannot find module '/home/treehouse/workspace/promises-breakfast.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

Hi, I came across the same problem; it seems that the terminal can't find the location of "promises-breakfast.js", hence the error. I solved this by working on my text editor rather than on the Workspace. Create a "promises-breakfast.js" file on your compter, then execute the node command on the built in terminal (or in any other bash terminal, for that matter), just like Guil does in the tutorial. Make sure that, before running the node command, you're located in the directory in which your JS file is saved, otherwise it won't find it and give you the same error. Hope that helped!