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

Compile Error with Create React App with React 17 #67

Closed
tioluwani94 opened this issue Jan 5, 2023 · 9 comments
Closed

Compile Error with Create React App with React 17 #67

tioluwani94 opened this issue Jan 5, 2023 · 9 comments

Comments

@tioluwani94
Copy link

Hello 👋🏽,

I'm getting a compile error when I try to use the react-resizable-panels components in my project:

Screenshot 2023-01-05 at 5 26 57 PM

I have the following setup in my package.json:

"react": "17.0.0", "react-dom": "17.0.0", "react-scripts": "4.0.3",

I'll appreciate any pointers to resolve this, thank you!

@bvaughn
Copy link
Owner

bvaughn commented Jan 5, 2023

The operator causing the error you're reporting is the nullish coalescing operator (??):

return state[key] ?? null;

Guessing create-react-app isn't configured to handle that. I don't know what the easiest fix is. I'm not a create-react-app user anymore.

@tioluwani94
Copy link
Author

tioluwani94 commented Jan 5, 2023

Hi, @bvaughn thanks for the response it was very helpful. I was able to resolve the issue with the help of this:
facebook/create-react-app#9468 (comment)

@bvaughn
Copy link
Owner

bvaughn commented Jan 5, 2023

Glad to hear it!

@bvaughn
Copy link
Owner

bvaughn commented Jan 10, 2023

FYI, I removed the nullish coalescing operator in v0.0.31 because the trivial benefit it provided didn't seem worth causing headaches for create-react-app users.

@tioluwani94
Copy link
Author

Alright, thanks for the update.

@bvaughn
Copy link
Owner

bvaughn commented Jan 18, 2023

By the way, if you update to 0.0.35– this module should now work with CRA without any additional configuration changes.
https://github.com/bvaughn/react-resizable-panels/releases/tag/v0.0.35

@tioluwani94
Copy link
Author

By the way, if you update to 0.0.35– this module should now work with CRA without any additional configuration changes.

https://github.com/bvaughn/react-resizable-panels/releases/tag/v0.0.35

Thanks for the update @bvaughn

@daniel0130
Copy link

By the way, if you update to 0.0.35– this module should now work with CRA without any additional configuration changes.

https://github.com/bvaughn/react-resizable-panels/releases/tag/v0.0.35

Thanks for the update @bvaughn

1 similar comment
@daniel0130
Copy link

By the way, if you update to 0.0.35– this module should now work with CRA without any additional configuration changes.

https://github.com/bvaughn/react-resizable-panels/releases/tag/v0.0.35

Thanks for the update @bvaughn

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

No branches or pull requests

3 participants