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

Error: Can't resolve 'react/lib/Object.assign' with React 15.0 #28

Closed
nil4 opened this issue Apr 7, 2016 · 15 comments
Closed

Error: Can't resolve 'react/lib/Object.assign' with React 15.0 #28

nil4 opened this issue Apr 7, 2016 · 15 comments

Comments

@nil4
Copy link

nil4 commented Apr 7, 2016

Using react-spinkit version 1.1.4 with React 15.0 results in the following error:

ModuleNotFoundError: Module not found: Error: Can't resolve 'react/lib/Object.assign' in 'C:\projects\MyProject\node_modules\react-spinkit\dist'

@KyleAMathews
Copy link
Owner

So that require wasn't even being used. Removed it and published 1.1.5. 1404b27

@nil4
Copy link
Author

nil4 commented Apr 7, 2016

@KyleAMathews awesome, thank you for the fantastic turn-around time!

@nil4
Copy link
Author

nil4 commented Apr 7, 2016

@KyleAMathews I upgraded to 1.1.5 but still fails; dist/index.js still has the line:

objectAssign = require('react/lib/Object.assign');

@KyleAMathews
Copy link
Owner

Ooops! Forgot to compile the src. I re-published 1.1.6.

@nil4
Copy link
Author

nil4 commented Apr 7, 2016

@KyleAMathews thanks a lot! Unfortunately there's another issue: React.__spread has been removed in v15.0, and the <div {... @props} syntax seems to compile down to it.

@KyleAMathews
Copy link
Owner

Ha :-) would you mind taking a crack at solving this?
On Thu, Apr 7, 2016 at 4:12 PM nil4 [email protected] wrote:

@KyleAMathews https://github.com/KyleAMathews thanks a lot!
Unfortunately there's another issue: React.__spread has been removed
facebook/react#6431 in v15.0, and the <div {...
@props} syntax seems to compile down to it.


You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
#28 (comment)

@KyleAMathews
Copy link
Owner

facebook/react#6444

@nil4
Copy link
Author

nil4 commented Apr 7, 2016

Tracked it down to cjsx-loader, specifically this: jsdf/coffee-react-transform#32. I'll open an issue on there. For now, I can unblock myself by using just the CSS styles; it would be a shame though, since react-spinkit is such a nice library -- thank you again.

@KyleAMathews
Copy link
Owner

If you see the above PR, they're adding it back in.

@zpao
Copy link

zpao commented Apr 7, 2016

You should still stop using it :)

@KyleAMathews
Copy link
Owner

This was written back in my hellion Coffeescript days ;-)

@nil4
Copy link
Author

nil4 commented Apr 7, 2016

I opened jsdf/coffee-react-transform#70 while waiting for React 15.0.1 😄.

@KyleAMathews
Copy link
Owner

15.0.1 was released.

@nil4
Copy link
Author

nil4 commented Apr 18, 2016

@KyleAMathews: jsdf/coffee-react-transform#70 was fixed, removing the use of React.__spread. Would you consider upgrading to version 4.0 to fix this one for good?

@KyleAMathews
Copy link
Owner

Updated and released 1.1.7.

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