Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Reload' did not change when I modified a js file #8461

Closed
hyvenzhu opened this issue Jun 28, 2016 · 20 comments
Closed

'Reload' did not change when I modified a js file #8461

hyvenzhu opened this issue Jun 28, 2016 · 20 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@hyvenzhu
Copy link

0.28.0 does not work while 0.27.0 works well.
When I init a React-Native project, after change a js file, reload does not work well

@Chanasit
Copy link

same as me

@satya164
Copy link
Contributor

Can you provide more information on what exactly not working? Live reload? HMR?

@hyvenzhu
Copy link
Author

@satya164
'Reload JS', there is no error happened on the terminal

@shtefanntz
Copy link
Contributor

shtefanntz commented Jun 29, 2016

I confirm this as well. I've tried previous fixes before (restarting the server, resetting the cache), but it still doesn't react to file changes.

Another thing noticed is the rather long time for the sever to start:
[6:09:42 AM] Building Dependency Graph
.
.
.
[6:15:41 AM] find dependencies (31143ms)

Besides that, the node js process hogs all the processor while starting the server. I noticed that because my computer started simulating coffee grinding :) while the packager was crawling the file system.

@dsibiski
Copy link
Contributor

@hiphonezhu: Are you definitely enabling "Live Reload" in the simulator? The "Live Reload" setting is set and persisted for each app. If you build a new app it will default to not having it enabled. Can you verify that setting? You didn't mention if you were performing this step or not.

@hyvenzhu
Copy link
Author

@dsibiski I am sure that I do not enabling "Live Reload", just 'reload js'

@jude-liu
Copy link

I have the same problem whether enable "Live Reload" or "Hot Reloading", or both of them.

@gapgag55
Copy link

gapgag55 commented Jul 2, 2016

I reloaded not changing. same!!

@arthurxavierx
Copy link

@satya164, I believe this is the same as #8635

@shtefanntz
Copy link
Contributor

Still reproducing in RN 0.29 :(

@shtefanntz
Copy link
Contributor

Apparently, the fix isn't related to RN.
I followed the instructions from @InnerPeace080 in #7257 and everything works as before

@xiDaiDai
Copy link

+1

@micsay
Copy link

micsay commented Jul 12, 2016

+1,thanks

@vzhen
Copy link

vzhen commented Aug 28, 2016

anyone solution? i have the same issue on 0.30 to 0.32

@guilhermebruzzi
Copy link
Contributor

guilhermebruzzi commented Sep 2, 2016

Same issue on 0.32 on iOS device. On Android device is working.

Reload js is not refreshing the js code and also the hot reload and live reload options are not appearing.

@togayther
Copy link

same issue on android device with react-native 0.32.

finally, i found method to solve this problem.

in file "react-native\packager\react-packager\src\node-haste\FileWatcher\index.js"
you can increase "MAX_WAIT_TIME" variable. such: 360000.

and change function "_createWatcher"

to

_createWatcher(rootConfig) {
    const watcher = new WatcherClass(rootConfig.dir, {
      glob: rootConfig.globs,
      dot: false,
    });

    return new Promise((resolve, reject) => {
      const rejectTimeout = setTimeout(
        () => reject(new Error([
            'Watcher took too long to load',
            'Try running `watchman version` from your terminal',
            'https://facebook.github.io/watchman/docs/troubleshooting.html',
          ].join('\n'))),
        MAX_WAIT_TIME
      );

      watcher.once('ready', () => {
        clearTimeout(rejectTimeout);
        resolve(watcher);
      });
    });
  }

that's all and work for me.

@afilp
Copy link

afilp commented Sep 6, 2016

I also have exactly the same problem on v0.32: "the hot reload and live reload options are not appearing."

@togayther Does your solution solve this problem too?

@togayther
Copy link

yes, its work for me. @af7

@davidaurelio
Copy link
Contributor

We only support HMR for React components, with all the limitations of https://github.com/gaearon/react-transform-hmr#readme

@omhybrid
Copy link

i have same issue please give me solution

@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests