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.

Document Fast Refresh requirements and troubleshooting

See original GitHub issue

Bug report

Describe the bug

Fast refresh is not working when using named exports alongside default export.

To Reproduce

  • Setup new next project using next init
  • Go to pages/index.js and remove export default from your function component
export default function Home() {...}
// to
function Home() {...}
  • export something alongside your component as default
// end of the file
let a = 2;
export { a, Home as default};

Expected behavior

Fast refresh should work

System information

  • OS: Linux
  • Browser Chromium latest
  • Version of Next.js: 9.4.1
  • Version of Node.js: 12.16.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
thadwoodmancommented, May 20, 2020

Can you elaborate why you’d like to do this?

@Timer sure! I’m trying to troubleshoot an error I’m getting on worker in my local dev environment:

Uncaught ReferenceError: $RefreshSig$ is not defined

After some Googling it seems like this is related to React Refresh and I only started seeing this error after upgrading to Next.js 9.4. I should note that there are other people on my team using the same build and not getting this error.

I was just looking for an easy way to turn off Fast Refresh to troubleshoot the issue.

2reactions
dohomicommented, May 29, 2020

I’d like to know the reason of it too. I’m using TypeScript and exporting types in my components and not sure if that triggers a hard refresh? And how about to work with external libraries which export named components not default exports?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Features: Fast Refresh - Next.js
Next.js' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >
How To Troubleshoot Materialized View Fast Log Timestamp ...
Purpose · Troubleshooting Steps · 1./ Verify that Fast refresh is being used · 2./ What type of fast refresh is running? ·...
Read more >
Materialized View Fast Refresh Performance Tips
A materialized view that is verified to be fast refresh should update relatively fast. But what happens when there are few changes to...
Read more >
Fast Refresh | Gatsby
Fast Refresh is an implementation of Hot Reloading with full support from React. It replaces unofficial solutions like react-hot-loader . With Fast Refresh...
Read more >
Troubleshoot incremental refresh and real-time data in Power BI
This can be caused by a data type mismatch where Date/Time is the required data type for the RangeStart and RangeEnd parameters, but...
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