How do you reinstall an app's dependencies using npm?

后端 未结 10 2383
陌清茗
陌清茗 2020-12-07 07:22

Is there a simple way to reinstall all packages that my app depends on (i.e. they are in my apps node_modules folder)?

10条回答
  •  日久生厌
    2020-12-07 07:58

    For Windows you can use

    (if exist node_modules rmdir node_modules /q /s) && npm install
    

    which removes node_modules directory and performs npm install then. Removal before install assures that all packages are reinstalled.

提交回复
热议问题