This is my command line, routes is a module and is being imported and exported properly since it works on a different computer.
2
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
Node.js
require()
./routes.js
index.js
You check index.js file and require ./routes/<file_name> to require file of routes folder you want
./routes/<file_name>
Click here to cancel reply.
2
Answers
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 asindex.js
You check index.js file and require
./routes/<file_name>
to require file of routes folder you want