I wanted to create an icon for my app, so i am using this answer from How to add icons to React Native app
then i made this in the react-native project
yarn add @bam.tech/react-native-make
right here it worked all
so i applied this react-native set-icon --path ./assets/icon.png --background green --platform android
now i am getting this error:
i am getting this error: The current character read is ‘E’ with an int
value of 69 Unable to determine the current character, it is not a
string, number, array, or object line number 1 index number 0 Error:
ENOENT: no such file or directory, lstat
‘/Users/macbookcf/Desktop/gitlab/cryptoapp/android/node_modules/@bam.tech/react-native-make’
3
Answers
Try re starting your terminal. clearing the cache.
But their can be an issue with the newly installed package.
Try re installing the package or its previous versions.
Sometime they work. Because the error seems to be inside the root directory of the package itself.
https://github.com/bamlab/react-native-make was archived a year ago. I recommend you add icons manually as described in your link. For icon generation, you can try this free website https://appicon.co/
Update 2022
Since the @bam.tech/react-native-make is no longer maintained
Android and iOS icon
You can now generate icons with one command both for iOS and Android with rounded icon:
Adaptive Android icon
background – The color (E.g. "#ffffff") or image asset (E.g. "assets/images/christmas-background.png")
foreground – The image asset (E.g. "assets/images/christmas-foreground.png")