junedomingo / react-native-rename

Rename react-native app with just one command
MIT License
2.63k stars 261 forks source link

Error: Dynamic require of "normalize-path" is not supported #173

Closed KenAndSean closed 1 year ago

KenAndSean commented 1 year ago

Anyone can help me? I just init a new project with react-native cli. and then use this command, npx react-native-rename "new_name". I got this error.

Package Version: react-native: 0.70.6 react: 18.1.0

junedomingo commented 1 year ago

Hi @KenAndSean , can I ask for your other env details?

junedomingo commented 1 year ago

@KenAndSean try v3.2.6 now, let me know how it goes

KenAndSean commented 1 year ago

@KenAndSean try v3.2.6 now, let me know how it goes

Thank for your help. I got this response info after running the command: npx react-native-rename@3.2.6 "Travel App" --------response------- This is not a git repository

Any help?

Buy the way. operating system: Winsows 10 21H2 npm version: 8.11.0 node version: v16.16.0 react-native-rename version: 3.2.6

junedomingo commented 1 year ago

Hi @KenAndSean for safety reasons, you need to git init your app project so you can always revert to the original state when an issue occurs during renaming.

Steps you can do:

git init
git add .
git commit -m "Initial commit"

You may now proceed to rename it

npx react-native-rename "Travel App"
milindgoel15 commented 1 year ago

for safety reasons, you need to git init your app project so you can always revert to the original state when an issue occurs during renaming.

Hey @junedomingo , can you please add this to the documentation since its a necessary step anyway.