JavaScript Building a MEAN Application Setting Up MongoDB Debugging Express Application Refresher

iron-node command not working

I have been following along with the video and installed iron-node globally, but for some reason when I run the 'iron-node src/app.js' command, nothing is happening in gitBash, it just sits there. Have tried a few Google searches, but I haven't come up with anything.

I've tried running it with the server off and server running, with no luck. I have also tried it with the Mongo DB running and not running, nothing seems to make a difference. Tried installing iron-node multiple times as well.

Ken Howard
Ken Howard
Treehouse Guest Teacher

Have you tried running iron-node in the root of your project without including the path of app.js?

Shawn Leberknight
Shawn Leberknight
2,428 Points

I'm also having issues with iron-node. When I run the command I get an Electron message stating,

Uncaught Exception:
TypeError: app.getPath is not a function
    at Config (/usr/local/lib/node_modules/iron-node/app/config.js:56:35)
    at initializeApplication (/usr/local/lib/node_modules/iron-node/app/index.js:35:41)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/iron-node/app/index.js:48:15)
    at emitOne (events.js:95:20)
    at EventEmitter.emit (events.js:182:7)

1 Answer

Hey Jon,

I ran into a similar issue -- the problem was a port conflict because nodemon was already running the app on port 3000. On the command line, type "killall -9 node" and then try running "iron-node src/app.js" from the root directory again.

Hope this helps.