question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should react-scripts be in dependencies or devDependencies?

See original GitHub issue

When bootstraping a new project, the react-scripts is listed in dependencies, but the docs suggests that should be in devDependencies. See updating-to-new-releases.md:

react-scripts is a development dependency in the generated projects (including this one).

And this image in the landing page:

image

I’m guessing that the previous versions worked fine in devDependencies, but something changed and the docs wasn’t updated.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

1reaction
shirazecommented, Dec 18, 2020

Duh - it’s late and I misread your issue @luanorlandi !

It should be in dependencies but the image on https://create-react-app.dev/ is now out of date, and https://create-react-app.dev/docs/updating-to-new-releases mentions “development dependency” The image is definitely misleading, and the statement above could be misinterpreted

1reaction
matijscommented, Dec 8, 2020

Projects started with --template typescript end up with all DefinitlyTyped dependencies and TypeScript itself in dependencies as well instead of under devDependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consider moving react-scripts to devDependencies in the ...
From that perspective, all dependencies (including React) are "dev" dependencies because they're only necessary for the build: once you build ...
Read more >
How to do a react build, when react-scripts is marked as dev ...
Browsing around this I see react-scripts should ideally be a Dev-dependency. So just wanted to check if anyone can help here, how to...
Read more >
devDependencies vs Dependencies in reactJS - Medium
devDependencies are packages used for development purposes, e.g for running tests or transpiling your code. Many packages that you install ...
Read more >
react-scripts - npm
Configuration and scripts for Create React App.. Latest version: 5.0.1, last published: 9 months ago. Start using react-scripts in your ...
Read more >
Difference between dependencies, devDependencies and ...
As you install a package, npm will automatically install the dev dependencies. peerDependencies are not automatically installed. You need to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found