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.

When I yarn upgrade a package I have to restart create-react-app server

See original GitHub issue

When I run yarn upgrade package-name-xxx, I need to restart the dev server in order to see those changes.

Here are steps to reproduce. (Note the following example uses a an npm package I made, https://github.com/tnrich/semver-console , that just console logs its semver number when required.)

In terminal tab #1:

(using latest version of create-react-app@1.3.3)
create-react-app yarn-upgrade-test
cd yarn-upgrade-test/
yarn start

In terminal tab #2:

yarn add semver-console@0

At the top of yarn-upgrade-test/src/App.js add:

import "semver-console";

in the browser console you’ll now see:

SEMVER: 0.0.0

In terminal tab #2 run:

yarn upgrade semver-console@1

in the browser console you’ll still see:

SEMVER: 0.0.0

instead of the expected

SEMVER: 1.0.0

Note: The bulk of this issue was already in a comment in https://github.com/facebookincubator/create-react-app/issues/2606

This is quite a pain point for us because we use a lot of linked npm packages when developing our app and the start up time is quite slow for create-react-app.

Any help getting this resolved would be greatly appreciated. Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
EnoahNetzachcommented, Jan 30, 2018

@maciej-ka it should be possible to use webpack’s internal watcher, just by tweaking its “ignore” config to watch e.g. package.json files inside node_modules.

1reaction
mrmckebcommented, Jun 16, 2021

This is expected behaviour, but we’d recommend looking at something like nodemon to help manage situations like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Old React App Not Starting | Solution | Yarn Start Error
Node JS has been upgraded, react and create - react - app have been. ... package will be upgraded Now run the app...
Read more >
yarn error code 1 when i create a react app - Stack Overflow
7. Try running npm ls webpack-dev-server in your project folder. This will tell you which other package (apart from the expected react-scripts) ...
Read more >
Getting Started - Create React App
Then open http://localhost:3000/ to see your app. When you're ready to deploy to production, create a minified bundle with npm run build ....
Read more >
Upgrade the React App Version - The newline Guide to ...
Copy the yarn command (or npm, if that's your preference): yarn add --exact react-scripts@4.0.3 , and paste it into your terminal while inside...
Read more >
Create a New React App
Live-editing CSS and JS in development. Optimizing the output for production. The toolchains recommended on this page don't require configuration to get started ......
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 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