0

Most of the time, when I need to install a package as a devDependency but I forget to add --save-dev command thus this installation is final to dependency.

What I do:

"dependencies": {
    "@types/express": "^4.11.1"
},
"devDependencies": {

}

But my requirement is:

"dependencies": {

},
"devDependencies": {
    "@types/express": "^4.11.1"    
}

Now, do I need to reinstall it as devDependency or cut and paste in devDependency is OK?

MWN
  • 377
  • 1
  • 5
  • 17
  • 1
    Check out [this question](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies) – Mike Bovenlander May 07 '18 at 07:21
  • I know the difference but question is do I need to reinstall the package for `devDependency` or just `copying` and `pasting` in `devDependency` array is ok – MWN May 07 '18 at 07:24
  • some days ago I went through this link you provided. – MWN May 07 '18 at 07:24
  • You can copy/past the package from devDependencies to dependencies. – Mike Bovenlander May 07 '18 at 09:54

0 Answers0