eng alaa eng alaa - 11 days ago 43
Node.js Question

cannot find module.js error 471 win 10

strong textC:\Users\eurnet>git clone C:\Users\eurnet\node-postgres-todo
fatal: destination path 'node-postgres-todo' already exists and is not an empty directory.

C:\Users\eurnet>node server/models/database.js


module.js:471
throw err;
^

Error: Cannot find module 'C:\Users\eurnet\server\models\database.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3


what should do ??\

Answer

Run the following command. Please note that the following command will delete the folder node-postgres-todo and clone the project provided you give the GIT repository path where specified. (Below command is considering you are using windows environment)

rmdir /s node-postgres-todo & git clone <GIT PATH>