skip to Main Content

This is my command line, routes is a module and is being imported and exported properly since it works on a different computer.

enter image description here

2

Answers


  1. Your error mean that Node.js cant locate the specified modules,
    you can also check that the file path specified in the require() is correct, so make sure that ./routes.js is in the same directory as index.js

    Login or Signup to reply.
  2. You check index.js file and require ./routes/<file_name> to require file of routes folder you want

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search