Packager does not see changes to files. Reload does not work.
When I first started my project, reloading without recompiling worked. Somewhere along the way I broke this.
When I run the project from Xcode, the packager terminal window opens fine but it doesn't see the changes I'm making to the JS files. I'm using Atom as my editor.
This is as far as it gets: React packager ready.
[11:06:24 AM]
I've tried uninstalling watchman. Updating and upgrading homebrew. Killing the process and restarting. Rebooting computer. Nothing seems to get it back to the old way.
Hey lernerbot, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
- If this is a feature request or a bug that you would like to be fixed by the team, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
- If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag
react-nativeor for more real time interactions, ask on Discord in the #react-native channel. - We welcome clear issues and PRs that are ready for in-depth discussion; thank you for your contributions!
@lernerbot Is the app loading? I don't see a network request for the bundle in your terminal output.
StackOverflow and Discord #react-native channel is the best way to get help on issues like this.
Yes, the app is loading if I run it from Xcode. Sometimes I have to wait up to 10 seconds after saving the file for the changes to be seen.
This is the full output:
┌────────────────────────────────────────────────────────────────────────────┐ │ Running packager on port 8081. │ │ │ │ Keep this packager running while developing on any JS projects. Feel │ │ free to close this tab and run your own packager instance if you │ │ prefer. │ │ │ │ https://github.com/facebook/react-native │ │ │ └────────────────────────────────────────────────────────────────────────────┘ Looking for JS files in /Users/lernerbot/reactnative/BeaconMobile
[11:06:16 AM]
React packager ready.
[11:06:24 AM]
I had the same problem. All of a sudden the packager stopped bundling when I changed files. This had been working for months without problems.
What I discovered was that my .git/ directory had an index.lock file. Once I deleted that file, the automatic re-bundling started working again.
I'm getting crazy with this, both react-native start and react-native bundle seem to be stuck on an old version of my code that doesn't exist anywhere anymore! Cleaning, deleting, re-cloning my repo didn't help...
[edit] rebooting my computer seemed to do the trick...
I'm getting this too. It seems to be a watchman bug perhaps, since running
watchman watch-del-all
and then reloading works after. I'm on watchman 4.3.0 -- what version is everyone else using?
Hrm, downgrading to watchman 4.1.0 seems to have helped the issue.
For me, it helped to start react-native bundle with the option --verbose, get the cache directory out of the log (for me, its /var/folders/jf/j39xsb090795rm8l98qjdff80000gn/T/) and do a rm react-packager* in there. After that, it's using the latest version of the files again.
I ran into this same problem with watchman 3.9.0
Given this issue seems connected to many different situations and problems, and the fact that watchman has progressed, we're closing this issue in favor of more reproducible examples.
If you run into this, please try removing the packager cache as mentioned above, or the watchman watch-del-all command before submitting another issue. Thanks!
I am having the same issue of Packager on windows. It is too slow while performing the initial tasks( probably have to wait for 5-10 mins to get ready for request).
After some modification to .js file ut does not reloads the app not even hot reloading.
Enabling the Live reload / Hot reloading also doesn't works.
Updated node to 6.2.0 and npm v 3.8.9 But all the deps were installed via Node 4.4.5
After updating the node but still file changes are not detected and packager serves the old app bundle on every request.
Thanks!
Yep. Having the same problem as Harry008.
also have the same problem, in windows. the packager is serving old files and i dont know where the cache is ...
i found a fix by using a new package watcher
On Jul 15, 2016 7:27 AM, "YoonesKh" [email protected] wrote:
also have the same problem, in windows. the packager is serving old files and i dont know where the cache is ...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/4357#issuecomment-232965368, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0wdEaOrMNEfn8Kpt5RNp04_BNO2TWrks5qV5jPgaJpZM4Gpd6i .
@anraiki can you please explain?
I opt for a solution by replacing their new "watching" packager. It's in alpha sadly, but apparently it fixed my problem.
https://github.com/facebook/watchman/issues/19
It doesn't hurt to try it.
On 7/15/2016 8:25 AM, YoonesKh wrote:
@anraiki https://github.com/anraiki can you please explain?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/4357#issuecomment-232983004, or mute the thread https://github.com/notifications/unsubscribe-auth/AD0wdJm2aMi4Bgaolz2N1jNLcK455Bj3ks5qV6ZugaJpZM4Gpd6i.
@anraiki it fixed my problem too. thank yoo.
@anraiki @yooneskh How to replace watchman ? same issue.
"react": "15.2.1",
"react-native": "0.30.0",
OS: windows7
I download the new watchman, add it to PATH and
(current path is E:\temp2\RouterTest)
- watchman watch-del-all
- watchman watch E:\temp2\RouterTest
- react-native start
- reload js on genymotion I get error index.android.js not found. then I change some lines in index.android.js and reload js again. I get this error in terminal
[23:06:27] <END> find dependencies (2354ms)
Error: Unable to find file with path: E:\temp2\RouterTest\node_modules\react-nat
ive\packager\react-packager\src\Resolver\polyfills\prelude.js
at Fastfs.readFile (E:\temp2\RouterTest\node_modules\react-native\node_modul
es\node-haste\lib\fastfs.js:141:15)
at E:\temp2\RouterTest\node_modules\react-native\node_modules\node-haste\lib
\Module.js:168:49
at Cache.get (E:\temp2\RouterTest\node_modules\react-native\node_modules\nod
e-haste\lib\Cache\index.js:64:103)
at Polyfill.read (E:\temp2\RouterTest\node_modules\react-native\node_modules
\node-haste\lib\Module.js:167:26)
at Bundler._toModuleTransport (index.js:549:14)
at module._toModuleTransport.then (index.js:394:14)
at Array.map (native)
at index.js:411:48
at tryCallOne (E:\temp2\RouterTest\node_modules\react-native\node_modules\pr
omise\lib\core.js:37:12)
at E:\temp2\RouterTest\node_modules\react-native\node_modules\promise\lib\co
re.js:123:15
watch out for any watchman that node or chocolatey or anything else might have installed
On Thu, Jul 28, 2016, 20:07 New [email protected] wrote:
@anraiki https://github.com/anraiki @yooneskh https://github.com/yooneskh How to replace watchman ? same issue.
"react": "15.2.1", "react-native": "0.30.0",
OS: windows7
I download the new watchman, add it to PATH and
(current path is E:\temp2\RouterTest)
- watchman watch-del-all
- watchman watch E:\temp2\RouterTest
- react-native start
- reload js on genymotion I get error index.android.js not found. then I change some lines in index.android.js and reload js again. I get this error in terminal
[23:06:27]
find dependencies (2354ms) Error: Unable to find file with path: E:\temp2\RouterTest\node_modules\react-nat ive\packager\react-packager\src\Resolver\polyfills\prelude.js at Fastfs.readFile (E:\temp2\RouterTest\node_modules\react-native\node_modul es\node-haste\lib\fastfs.js:141:15) at E:\temp2\RouterTest\node_modules\react-native\node_modules\node-haste\lib \Module.js:168:49 at Cache.get (E:\temp2\RouterTest\node_modules\react-native\node_modules\nod e-haste\lib\Cache\index.js:64:103) at Polyfill.read (E:\temp2\RouterTest\node_modules\react-native\node_modules \node-haste\lib\Module.js:167:26) at Bundler._toModuleTransport (index.js:549:14) at module._toModuleTransport.then (index.js:394:14) at Array.map (native) at index.js:411:48 at tryCallOne (E:\temp2\RouterTest\node_modules\react-native\node_modules\pr omise\lib\core.js:37:12) at E:\temp2\RouterTest\node_modules\react-native\node_modules\promise\lib\co re.js:123:15 — You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/4357#issuecomment-235932927, or mute the thread https://github.com/notifications/unsubscribe-auth/AKFfVeK1QtVB3CJnavy2M6YVeSGVSEH6ks5qaMyggaJpZM4Gpd6i .
I'm having the same problem here. Can anyone help me out? It appears that my packager is not bundling it. Everytime I make changes and do Cmd+R, it blinks the screen but not loading any changes.
Xcode 7.3 Watchman 4.6 React Native 0.30