How to npm install --save all packages already installed?

前端 未结 1 1732
有刺的猬
有刺的猬 2021-02-05 09:23

Is there a way I can update package.json from node_modules directory? Sometimes I forget to use --save flag.

Thanks!

1条回答
  •  [愿得一人]
    2021-02-05 10:02

    I came up with this simple cmd

    npm install `ls node_modules` --save

    It's good enough for my case :-)

    0 讨论(0)
提交回复
热议问题