Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.