-2

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 ??\

eng alaa
  • 3
  • 2
  • seems, you already have that folder, try deleting it. or give a new name to cloned one, `git clone C:\Users\eurnet\node-postgres-todo node-postgres-todo-1` – Sravan Nov 28 '16 at 10:03
  • press ls -l, in `C:\Users\eurnet>` and pls paste the result – Sravan Nov 28 '16 at 10:25
  • C:\Users\eurnet>git clone C:\Users\eurnet\node-postgres-todo-1 fatal: destination path 'node-postgres-todo-1' 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 – eng alaa Nov 28 '16 at 10:25
  • you have taken a wrong command, please check my command again, now try with 2, `git clone C:\Users\eurnet\node-postgres-todo node-postgres-todo-2` – Sravan Nov 28 '16 at 10:27
  • i change to 2 ...the same .. and i test ls-l and i find some files – eng alaa Nov 28 '16 at 10:33
  • ls-l-depth-0 you mean this file?? – eng alaa Nov 28 '16 at 10:39
  • [check this once](http://stackoverflow.com/questions/20446514/cannot-find-module-in-nodejs) – Sravan Nov 28 '16 at 10:42
  • where should i put ( var todo = require)... in database.js – eng alaa Nov 28 '16 at 10:45
  • you can place it at the top, with the correct path – Sravan Nov 28 '16 at 10:46
  • i write in database.js var todo = require('node-postgres-todo-2/server/models/database.js'); .... and still the same – eng alaa Nov 28 '16 at 10:52

1 Answers1

0

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>
XCEPTION
  • 1,671
  • 1
  • 18
  • 38