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

react-dom/profiling TypeError: Cannot read property 'current' of null #13601

Closed
gaearon opened this issue Sep 8, 2018 · 2 comments · Fixed by #13605
Closed

react-dom/profiling TypeError: Cannot read property 'current' of null #13601

gaearon opened this issue Sep 8, 2018 · 2 comments · Fixed by #13605

Comments

@gaearon
Copy link
Collaborator

gaearon commented Sep 8, 2018

I can't quite figure out how to use the profiling build. I aliased react-dom to react-dom/profiling but I get this error:

screen shot 2018-09-08 at 20 17 02

screen shot 2018-09-08 at 20 17 06

I didn't want interactions, I just want profiling. What am I doing wrong?

To repro, use CRA, then eject, then add react-dom -> react-dom/profiling to alias in webpack prod config and build.

@gaearon
Copy link
Collaborator Author

gaearon commented Sep 8, 2018

This worked:

      'react-dom': 'react-dom/profiling',
      'schedule/tracking': 'schedule/cjs/schedule-tracking.profiling.min'

@bvaughn
Copy link
Contributor

bvaughn commented Sep 9, 2018

Rats. Looks like an oversight in the way the schedule/tracking endpoint doesn't initialize its refs in production mode. I hadn't really been considering the use of profiling react-dom with non-profiling schedule/tracking 😦

Fastest fix would be to put out a bugfix release of schedule/tracking production bundle that initializes the refs. Shouldn't impact non-profiling react-dom since its production bundle doesn't even require schedule/tracking

Not sure if we'd want to warn about this from react-dom profiling bundle, since we don't normally do warnings in production bundles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants