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
Something went wrong installing the "sharp" module #20957
Comments
@KamranMaqbool I sometimes see this, especially when moving between different branches that have different dependency versions, sharp seems especially vulnerable to this. To resolve I do (with yarn):
|
Thank you for opening this, @KamranMaqbool There are several issues discussing this problem with suggested solutions: Try those, one of them should fix it for you. We're marking this issue as answered and closing it for now but please feel free to reopen this and comment if you would like to continue this discussion. We hope we managed to help and thank you for using Gatsby! 💜 |
TypeError: Cannot read property '_context' of undefined in Gatsby useContext node_modules/react/cjs/react.development.js:1481
|
I am sorry @vladar, but I don't think this issue should be closed. Clearly many people run into this problem, and all of the "solutions" mentioned in other tickets are just workarounds. I understand Sharp is an external dependency, but since it's a problem that's been bugging it for a long time and their developers have not fixed it yet, I think it's time to move away from Sharp, or at least make it optional. I work on three different machines, and each time I want to clone a repository on one of them and work on my project I get this error. Sharp should be removed or replaced with a better solution. |
I tried all suggested solutions. it turns out yarn cache was the issue! yarn cache clean
rm -rf node_modules
yarn
... |
This error is killing me, spent 2 days trying to fix it and nothing... |
Me too !!! Argggg. Did you solve your problem? How?! |
Not yet, but I have found out this and while I haven't tried yet, I feel it's close to my problem so it could potentially fix it: I think there is a new version to address the issue. |
I solved my problem here ! I really don't know why, but completely uninstalling NodeJs and reinstalling it (checking the box with tools) worked for me. Just updating it is not enough. Good luck ! |
install gatsby-plugin-sharp plugin but when run command
The text was updated successfully, but these errors were encountered: