react-nativecreate-react-native-app

React Native Error create new project ' Copying template '


when I'm try create new react native project on macos Ventura 13.2

✔ Downloading template
✖ Copying template
error Error: Couldn't find the "/var/folders/mn/m8xhgjss2cj0jf5svmxg_2vm0000gn/T/rncli-init-template-VUPUIq/node_modules/react-native/template.config.js file inside "react-native" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-template.
Error: Error: Couldn't find the "/var/folders/mn/m8xhgjss2cj0jf5svmxg_2vm0000gn/T/rncli-init-template-VUPUIq/node_modules/react-native/template.config.js file inside "react-native" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-template
    at createFromTemplate (/Users/imac/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:129:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.initialize [as func] (/Users/imac/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/commands/init/init.js:181:3)
    at async Command.handleAction (/Users/imac/.npm/_npx/7930a8670f922cdb/node_modules/@react-native-community/cli/build/index.js:106:9)
info Run CLI with --verbose flag for more details.

I have tried removing and reinstalling the following

sudo npm uninstall -g react-native-cli @react-native-community/cli

Nodejs


Solution

  • The problem has been fixed by updating the system to 13.2.1 Then execute

    sudo npm uninstall -g react-native-cli @react-native-community/cli
    
    npx react-native init AwesomeProject --npm