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

Invalid hook call on fresh project #5

Closed
TimWillaert opened this issue Nov 17, 2020 · 3 comments
Closed

Invalid hook call on fresh project #5

TimWillaert opened this issue Nov 17, 2020 · 3 comments

Comments

@TimWillaert
Copy link

Receiving following error:
Screenshot_1
I created a project with create-react-app and installed the package through npm i react-animated-cursor

My App.js component just looks like this:
Screenshot_2

I tried clearing node_modules and npm installing again, but that doesn't help. Maybe I'm just being a dumb-dumb (I'm pretty new to React).
Really hoping to get this fixed, this looks like an awesome package!

@TimWillaert TimWillaert changed the title Invalid hook call Invalid hook call on fresh project Nov 17, 2020
@stephenscaff
Copy link
Owner

stephenscaff commented Nov 17, 2020 via email

@TimWillaert
Copy link
Author

Thanks for the quick response.
I started a new project without using create-react-app and it works fine now!

@stephenscaff
Copy link
Owner

Fixed.

Tested the package with CRA (and Parcel) and runs as expected.

You can reinstall or update to react-animated-cursor@2.1.8

Turns out the package did in fact include its own version of React.
Just had to move React/React Dom to dev and peer deps in package.json.

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

2 participants