How to import a module that is in a different folder in Node.js?

Cordial greetings, I hope you are well.

I would like some guidance on how I can import a module that is in another folder.

Here is an image:
module_import

However when importing the module it generates me error:

Error: Cannot find module '../controllers/index.js'
Require stack:

I would be very grateful for your guidance.

180 thoughts on “How to import a module that is in a different folder in Node.js?”

  1. you’re really a good webmaster. The web site loading velocity is amazing.

    It sort of feels that you are doing any distinctive trick.
    Furthermore, The contents are masterwork. you’ve done a fantastic process
    in this matter!

    Reply
  2. First off I would like to say fantastic blog!
    I had a quick question which I’d like to ask if you don’t mind.
    I was interested to find out how you center yourself and clear your head prior to writing.

    I have had a tough time clearing my thoughts in getting my thoughts out.
    I truly do enjoy writing but it just seems like the first 10 to 15 minutes tend to
    be wasted just trying to figure out how to begin. Any suggestions or hints?
    Cheers!

    Feel free to surf to my site – Keto Redux Review

    Reply
  3. Hi, I do believe this is an excellent web site.
    I stumbledupon it 😉 I’m going to return once again since i have bookmarked it.

    Money and freedom is the greatest way to change,
    may you be rich and continue to help other people.

    Take a look at my homepage – Viag Rx

    Reply
  4. Do you mind if I quote a few of your articles as long as I
    provide credit and sources back to your site? My blog is in the
    very same area of interest as yours and my users would definitely benefit from some of
    the information you provide here. Please let me know if
    this alright with you. Appreciate it!

    Feel free to visit my blog post; Advanced CBD Oil

    Reply
  5. I am curious to find out what blog system you happen to be
    using? I’m experiencing some small security issues with my latest
    site and I’d like to find something more secure.
    Do you have any solutions?

    Reply
  6. You really make it seem really easy along
    with your presentation however I find this matter to be actually something which I feel I’d never understand.
    It seems too complicated and extremely wide for me. I’m taking a look ahead on your subsequent put up,
    I will try to get the cling of it!

    Reply
  7. It’s a pity you don’t have a donate button! I’d without a doubt donate to this brilliant blog!
    I suppose for now i’ll settle for bookmarking and adding your RSS feed to
    my Google account. I look forward to new updates and
    will share this website with my Facebook group. Talk soon!

    Reply
  8. Hey I know this is off topic but I was wondering if you knew of any widgets I could
    add to my blog that automatically tweet my newest twitter updates.

    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading
    your blog and I look forward to your new updates.

    Reply
  9. Wow, incredible weblog structure! How lengthy have you ever been blogging for? you make running a blog glance easy. The whole glance of your website is fantastic, as neatly as the content material!

    Reply
  10. A lot of thanks for all of the hard work on this web site. My mother take interest in participating in internet research and it’s really easy to see why. We learn all about the powerful ways you produce priceless things through this web site and in addition foster participation from some other people about this subject so our favorite child has been being taught so much. Take pleasure in the rest of the new year. You’re performing a very good job. blog

    Reply
  11. Pingback: ivermectin 300 mg
  12. Fantastic items from you, man. I’ve bear in mind your stuff previous to and you’re simply too great.
    I actually like what you have acquired here, really like what you are saying and the way in which during which you are saying it.
    You make it entertaining and you continue to care
    for to keep it sensible. I can’t wait to read far more from you.
    This is actually a tremendous website.

    Feel free to visit my web site myzoo.it

    Reply
  13. Hi there! I could have sworn I’ve been to this site before but after looking
    at some of the posts I realized it’s new to me.
    Regardless, I’m certainly delighted I found it and I’ll be bookmarking it and checking back often!

    Here is my website :: heal eczema

    Reply
  14. Pingback: ffxiv gay dating
  15. Good web site! I truly love how it is easy on my eyes and the data are
    well written. I’m wondering how I might be notified
    when a new post has been made. I have subscribed to your RSS feed which must do the trick!
    Have a nice day!

    Feel free to visit my web-site comptine.biz

    Reply
  16. Pingback: human ivermectin
  17. Pingback: stromectol oral
  18. Pingback: ivermectin alcohol
  19. What’s Going down i am new to this, I stumbled upon this I
    have found It positively helpful and it has aided me out
    loads. I hope to contribute & aid other users like its aided me.
    Great job.

    Reply