Quantcast
Channel: What's the difference between dependencies, devDependencies, and peerDependencies in NPM package.json file? - Stack Overflow
Browsing latest articles
Browse All 37 View Live

Answer by ArturZ for What's the difference between dependencies,...

When using Webpack to bundle a frontend application, the distinction between dependencies and devDependencies is not so clear. For the final bundle, it doesn't matter where you place the dependencies...

View Article



Answer by Juanma Menendez for What's the difference between dependencies,...

dependencies: packages that your project/package needs to work in production.devDependencies: packages that your project/package needs to work while development but are not needed on production (eg:...

View Article

Answer by Sagar M for What's the difference between dependencies,...

dependencies are required to run, devDependencies only to develop

View Article

Answer by Quantalabs for What's the difference between dependencies,...

DependenciesThese are the packages that your package needs to run, so they will be installed when people run npm install PACKAGE-NAMEAn example would be if you used jQuery in your project. If someone...

View Article

Answer by user739DamQ for What's the difference between dependencies,...

I found a simple explanation. Short Answer:dependencies"...are those that your project really needs to be able to work in production."devDependencies"...are those that you need during...

View Article


Answer by Selva Ganapathi for What's the difference between dependencies,...

Dependencies vs dev dependenciesDev dependencies are modules which are only required during development whereas dependencies are required at runtime. If you are deploying your application, dependencies...

View Article

Answer by cherankrish for What's the difference between dependencies,...

In shortDependencies - npm install <package> --save-prod installs packages required by your application in production environment. DevDependencies - npm install <package> --save-dev...

View Article

Answer by ruffin for What's the difference between dependencies,...

peerDependencies didn't quite make sense for me until I read this snippet from a blog post on the topic Ciro mentioned above:What [plugins] need is a way of expressing these “dependencies” between...

View Article


Answer by Melchia for What's the difference between dependencies,...

When trying to distribute an npm package you should avoid using dependencies. Instead you need to consider adding it into peerDependencies.UpdateMost of the time dependencies are just a bunch of...

View Article


Answer by Sîrbu Nicolae-Cezar for What's the difference between dependencies,...

I'd like to add to the answer my view on these dependencies explanationsdependencies are used for direct usage in your codebase, things that usually end up in the production code, or chunks of...

View Article

Answer by Jyoti Duhan for What's the difference between dependencies,...

A simple explanation that made it more clear to me is:When you deploy your app, modules in dependencies need to be installed or your app won't work. Modules in devDependencies don't need to be...

View Article

Answer by qwertzguy for What's the difference between dependencies,...

dependenciesDependencies that your project needs to run, like a library that provides functions that you call from your code.They are installed transitively (if A depends on B depends on C, npm install...

View Article

Answer by Mohammed Safeer for What's the difference between dependencies,...

To save a package to package.json as dev dependencies: npm install "$package" --save-devWhen you run npm install it will install both devDependencies and dependencies. To avoid install devDependencies...

View Article


Answer by Gayan Charith for What's the difference between dependencies,...

If you do not want to install devDependencies you can use npm install --production

View Article

Answer by Ciro Santilli OurBigBook.com for What's the difference between...

Summary of important behavior differences:dependencies are installed on both:npm install from a directory that contains package.jsonnpm install $package on any other directorydevDependencies are:also...

View Article


Answer by Dan Kohn for What's the difference between dependencies,...

As an example, mocha would normally be a devDependency, since testing isn't necessary in production, while express would be a dependency.

View Article

Answer by Amberlamps for What's the difference between dependencies,...

There are some modules and packages only necessary for development, which are not needed in production. Like it says it in the documentation:If someone is planning on downloading and using your module...

View Article


What's the difference between dependencies, devDependencies, and...

This documentation answers my question very poorly. I didn't understand those explanations. Can someone say in simpler words? Maybe with examples if it's hard to choose simple words?Also added...

View Article
Browsing latest articles
Browse All 37 View Live




Latest Images