1

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 Answers3

2

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:

npx icon-set-creator create ./path/to/icon.png

I highly recommend using an icon with a size of at least 1024x1024 pixels

Adaptive Android icon

npx icon-set-creator create -b <background> -f <foreground> -A

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")

martiliones
  • 184
  • 1
  • 12
0

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.

Ark
  • 26
  • 3
0

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/

Kirill Novikov
  • 2,576
  • 4
  • 20
  • 33