Package react-scripts is installed as not a dev dependency
See original GitHub issueIs this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
node -v
:8.0.0
npm -v
:5.0.3
yarn --version
(if you use Yarn):npm ls react-scripts
(if you haven’t ejected):1.0.10
create-react-app --version
:1.3.3
Then, specify:
- Operating system: macOS Sierra
- Browser and version (if relevant):
Steps to Reproduce
nvm use 8
npm install --global create-react-app
create-react-app test-app
cd test-app
cat package.json
Expected Behavior
Package react-scripts
should appear in devDependencies
section
Actual Behavior
Package react-scripts
appears next to react-dom
in dependencies
section.
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:13 (7 by maintainers)
Top Results From Across the Web
How to do a react build, when react-scripts is marked as dev ...
Project is created using CRA, so react-scripts is marked as dependency in package.json. If I mark react-scripts as dev-dependency, since i don't ...
Read more >npm-install - npm Docs
As with regular git dependencies, dependencies and devDependencies will be installed if the package has a prepare script before the package is done...
Read more >react-scripts: command not found error [Solved] | bobbyhadz
If the error is not resolved, try to delete your node_modules and package-lock.json (not package.json ) files, re-run npm install and restart your...
Read more >Everything you need to know about react-scripts
In React apps, scripts are located in the package.json file's script section, ... This command will not only start the development server, ...
Read more >Fix: React Scripts Command not Found Error - Medium
This command can be made without npm via the command ./node_modules/.bin/react-scripts start . Alternatively, if the react-scripts package were installed ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Semantics.
It fixes deployment issues on some hosting providers that assume only dependencies are needed for the build. The line is also very thin in frontend development. None of them are “runtime” dependencies because we don’t have a server and they all get bundled into a single file. So if we were pedantic then we would have to declare everything as devDependencies, including React itself. I just figured that it’s not worth conceptual overhead anyway since distinction is largely arbitrary. For example polyfills could be categorised as either.