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.

Updated to latest Expo - No longer Fast Refreshes

See original GitHub issue

🐛 Bug Report

Environment

  Expo CLI 3.18.6 environment info:
    System:
      OS: macOS Mojave 10.14.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
      Yarn: 1.22.4 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
    IDEs:
      Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^37.0.0 => 37.0.7 
      react: 16.9.0 => 16.9.0 
      react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4 
    npmGlobalPackages:
      expo-cli: 3.18.6

iOS

Expected Behavior

I just ran expo upgrade to update expo to the latest version. Upon finishing and reloading, expo no longer refreshes on change.

Actual Behavior

Once upgrading expo, I expect my app to open with no issue

I’m getting this error message

TypeError: hmrClient.send is not a function. (In 'hmrClient.send(JSON.stringify({
        type: 'log-opt-in'
      }))', 'hmrClient.send' is undefined)

enable
    HMRClient.js:70:19
setup
    HMRClient.js:241:6
callFunctionReturnFlushedQueue
    [native code]:0

Reproducible Demo

In console, run expo upgrade. Start app and the error appears

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
byCedriccommented, Apr 27, 2020

Hi @wontwon! Thanks for the issue report and your package file. It looks like your dependency rnal has an older react-native dependency. This may cause some confusion for the metro bundler. I can see it’s fixed in the repository, but it’s not yet released on NPM. You can ask the maintainer to release that version of rnal, or use the master branch as workaround:

"rnal": "https://github.com/hayanisaid/rnal#master"`
rnal@0.2.1 dependencies
"dependencies": {
    "enzyme": "^3.9.0",
    "enzyme-adapter-react-16": "^1.10.0",
    "jest-enzyme": "^7.0.2",
    "react": "16.6.3",
    "react-dom": "^16.8.4",
    "react-native": "0.58.4",
    "styled-components": "^4.1.3"
},

Hope it helps! 😄

2reactions
limaAnicetocommented, Apr 28, 2020

Hi there, Just for future reference to who finds this.

I was struggling with the same issue (since bumping to RN 0.61), to solve it:

  1. If you have metro-react-native-babel-preset, set it to at least 0.56
  2. Search in your yarn.lock for react-native and check each version, if it doesn’t match your package.json react-native dependency version, you are gonna get this error
Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - Why is expo not refreshing when I save changes?
2 Option: Go to your device Settings find Expo Go and force stop or clean cache then reopen it. Unfortunately I noticed this...
Read more >
[Bug] Fast refresh not working in typescript expo app #1529
Run project from terminal with expo start , fast refresh works fine. Note: Not happening for every project, tested with javascript blank ...
Read more >
Enabling Fast Refresh with Expo Web in 2022
I was looking for a solution to have Fast Refresh for Expo for Web just as we have it for ios and Android...
Read more >
Fast Refresh with Expo Web! ‍♂️ - DEV Community ‍ ‍
Currently there's no official Fast Refresh Webpack plugin, but you can get started today using a great community plugin by Michael Mok!
Read more >
Fast Refresh - React Native
Fast Refresh. Fast Refresh is a React Native feature that allows you to get near-instant feedback for changes in your React components.
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