I'm trying to create a react-native app using "react-native init" but its throwing the below error. I have created apps before but it suddenly started to throw this error when i tried to create a new app
ERROR: [Errno 2] No such file or directory: 'add'
I tried to do npm start
, react-native start
. and deleted the
node_modules
and re-installed it.
info Setting up new React Native app in /home/sagar/Desktop/rn- prac/justTesting info Adding required dependencies ERROR: [Errno 2] No such file or directory: 'add' (node:9851) UnhandledPromiseRejectionWarning: Error: Command failed: yarn add [email protected] at makeError (/home/sagar/Desktop/rn- prac/justTesting/node_modules/execa/index.js:174:9) at Promise.all.then.arr (/home/sagar/Desktop/rn- prac/justTesting/node_modules/execa/index.js:278:16) at process._tickCallback (internal/process/next_tick.js:68:7) (node:9851) UnhandledPromiseRejectionWarning: Unhandled promise rejection.
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:9851) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.