What is the difference between dependencies and devDependencies?
dependencies are packages your app needs to run, like react and react-dom. devDependencies are packages needed only during development, like Parcel, Babel, and ESLint, which are not shipped to production.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in package.json Explained for React Beginners
It is the manifest of your project. It declares the project name and version, defines scripts like start and build, and lists the dependencies and devDependencies your project needs to run and develop.
The scripts section defines command shortcuts. When you run npm start or npm run build, npm looks up the corresponding script and runs it. Your dev server, build, lint, and test commands all live there.
It is better to use npm install packageName, which updates both package.json and the lockfile together. Editing package.json by hand can leave the lockfile out of sync and cause inconsistent installs.
Still have questions?
Browse all our FAQs or reach out to our support team
