bamlab / react-native-make

A collection of everyday React Native CLI tools
MIT License
761 stars 87 forks source link

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

Open strawberry-code opened 4 years ago

strawberry-code commented 4 years ago

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.

codetheweb commented 4 years ago

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.

zachariahtimothy commented 4 years ago

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.

chrisfinch commented 4 years ago

Same problem here. Also removed the package to solve.

thinklinux commented 3 years ago

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.

IAmMarcellus commented 3 years ago

@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 commented 3 years ago

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