react-native-make icon indicating copy to clipboard operation
react-native-make copied to clipboard

Cannot runt Metro Bundler: Something went wrong installing the "sharp" module

Open strawberry-code opened this issue 4 years ago • 6 comments

I installed react-native-make by

npm i --save @bam.tech/react-native-make

I run the the commands to generate icons and success both for android and for ios. I test the Apps, no problems on android, but when I run ios I get:

Screenshot 2020-02-29 at 15 46 08

I I removed the package npm remove @bam.tech/react-native-make and all worked fine.

After some days I noticed that I run the installation command giving --save option instead of -D. Could be this the problem? Unfortunately until next Monday I have no access to dev pc, so I have no chances to try it just now.

I could wait until Monday to check, but if someone could confirm immediately that the problem could be this, on Monday I will have more time to do other things.

strawberry-code avatar Feb 29 '20 14:02 strawberry-code

I had the same issue. Removing the package from my local dependencies worked fine, I guess I'll just use the package globally from now on.

codetheweb avatar Apr 11 '20 17:04 codetheweb

I am getting this as well when I Archive. Using Yarn react-native: 0.61.5 @bam.tech/react-native-make: 3.0.0. Confirmed when I delete @bam.tech/react-native-make from node_modules I am able to Archive.

zachariahtimothy avatar May 27 '20 19:05 zachariahtimothy

Same problem here. Also removed the package to solve.

chrisfinch avatar Aug 17 '20 09:08 chrisfinch

That is probably not a problem with this lib.

My problem was that I changed the node version with nvm but I didn't change the default version that nvm is using. So I installed sharp on 14.15.0 and tried to use it on 10.15.3. I fixed the default version to be the one that I want. Restarted my mac, rm -rf node-modules and then everything worked. Also removed the other versions of node that I had.

thinklinux avatar Nov 11 '20 20:11 thinklinux

@thinklinux I don't think this is a problem with this lib, but with the version of Sharp this lib is using. If I remove react-native-make, everything builds fine, even if I install the latest version of Sharp.

Has anyone tried upgrading the version of Sharp used in this lib?

IAmMarcellus avatar Feb 02 '21 21:02 IAmMarcellus

This would probably be fixed by merging this PR (which upgrades sharp): https://github.com/bamlab/react-native-make/pull/54

IAmMarcellus avatar Feb 02 '21 22:02 IAmMarcellus