Reputation: 685
I tried to install expo
after I executed the command exp start
but I got:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp.node'.
How can I fix this problem?
Upvotes: 42
Views: 51093
Reputation: 39
If you're using Gatsby, it's good to check if updating all packages associated with sharp
helps. I had this problem twice, and it helped
yarn add gatsby-plugin-sharp gatsby-plugin-manifest gatsby-transformer-sharp gatsby-transformer-sqip
Or
npm install gatsby-plugin-sharp gatsby-plugin-manifest gatsby-transformer-sharp gatsby-transformer-sqip
Upvotes: 0
Reputation: 17468
I encountered the identical issue, however, the execution of this single command line successfully resolved the problem at hand.
npm rebuild --verbose sharp
Please refer to the installation documentation under Common problems for further guidance.
Upvotes: 56
Reputation: 3159
Upgrading of gatsby-transformer-sharp
helped me in my case.
Upvotes: 0
Reputation: 1
if trying some quick command fixes don't work you can try rebuilding the node_modules.
Delete the whole node_modules folder and run npm install
npm install
Upvotes: 0
Reputation: 315
If anyone has this problem and other solutions didn't solve it. Try to uninstall vips globally, it worked for me.
npm -g uninstall libvips
brew uninstall vips
Then:
yarn clean
yarn install
gatsby develop
Upvotes: 1
Reputation: 101
Find the latest version of sharp and install it.
npm install [email protected] --save
This worked for me.
Upvotes: 10
Reputation: 461
I was facing same issue in mac when I update my developer tools using xcode-select install then node project stop working on local
worked for me
Upvotes: 0
Reputation: 3436
I am not using expo but faced this issue in react native.
All I did is "deleted node_modules/sharp" folder.
run npm install
.
fixed the issue.
Upvotes: 8
Reputation: 21
This causes after i updated, npm,angular version.
just try
npm i cordova-res
it solves above problem.
Upvotes: 2
Reputation: 311
Maybe you configured npm to ignore installation scripts. In that case delete the sharp module and run:
npm install --ignore-scripts=false
Upvotes: 3
Reputation: 4609
You may need to completely reinstall expo-cli
package.
yarn global remove expo-cli
yarn global add expo-cli
OR
npm uninstall expo-cli -g
npm install expo-cli -g
(If you don't have expo-cli
installed globally, remove global
/ -f
flags)
Upvotes: -3