Lost all files after creating a new module
已回答
Hello,
I had a React.js project that didn't recognize my files properly. I was not sure what was wrong as this never happened before, so I tried going to File → Project Structure → Modules → Create Modules. to see if it does anything.
However, after creating a new module, every single file (including git) of my project is gone (i.e. permanently deleted without even asking me for confirmation). I tried some data recovery tools and only a part of the files can be recovered. Is this an expected behavior of IntelliJ and if it is are my files still recoverable? I have put dozens of hours into this project already so I just cry.
请先登录再写评论。
Adding/removing modules from the project structure never deletes your files.
It's not clear what happened; probably the files were removed externally by accident.
IDE always shows confirmations for destructive actions.
If you can reproduce the problem, please provide the exact steps.
I'll try if I can reproduce it. I noticed after creating a new Module, it automatically ran the React initialization tool, not sure if that deleted my files. Currently I'm messing with data recovery tools and saved a few deleted files but the ones I put a long time in are gone bruh.
What do you mean by the React initialization tool? Please specify what module type you create and what files are added by a tool?
By react initialization tool, I mean
npx create-react-app my-react-appIt seems IntelliJ runs this automatically after creating a React project.
However, I tried to reproduce this with a new project, adding/removing modules didn't delete any files.
For the module, as suggested by React initialization tool, I created a React module.
For the files, it should be the standard files that the command creates, which you can see here: Create a New React App – React (reactjs.org)