简体   繁体   中英

Restore node_modules folder

I accidentally deleted MyProject/node_modules folder from my solution.

Is there any way to recreate this folder?

I tried npm install , npm update but no success.

There is a npm package which will search through your source code and create a list of dependancies.

If you create a new package.json (use npm init) then run dependency-check in your project directory, the file will be populated. Then simply run npm install.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM