-2

I was just following these commands:

Node.js Error: Cannot find module 'request'

npm init
npm install --save request
node app.js

And now when I go to my project directory, all my files are gone. Is there anyway to get them back???

ChatNoir
  • 415
  • 8
  • 18

1 Answers1

1

TO clear your thoughts, following commands does not remove files.

npm init  // Initialises the npm in your directory and creates package.json file.

npm install --save package_name // Install package in your directory in the node_module folder.

So, definitely, you have done something else, which has been causing directory removal or disappearance.

I would suggest you check trash.

Can you post history of commands you used? Maybe that would help me understand what happened exactly.

Harshal Yeole
  • 4,812
  • 1
  • 21
  • 43
  • I followed those commands exactly, nothing is in trash either – ChatNoir May 20 '18 at 19:35
  • I was moving projects around between my IdeaProjects directory and another directory, but for some reason one has been wiped and its not in trash – ChatNoir May 20 '18 at 19:38
  • Can you update your question and post history of commands you used? Also, did my answer help you understand use on npm init and npm install? – Harshal Yeole May 20 '18 at 19:41
  • Updated question – ChatNoir May 20 '18 at 19:43
  • Okay, I knew this commands. and I am sure that this commands, DID NOT REMOVE YOUR CODE....................................................NOW, I want to know how you were moving project to IdeaProjects dir? – Harshal Yeole May 20 '18 at 19:45
  • Just moving between two finder windows – ChatNoir May 20 '18 at 19:50
  • I noticed I made a copy of the project I eventually ended up losing the contents of, and deleted the extra one, but its not in trash. So that's probably what did it – ChatNoir May 20 '18 at 19:50