I was following the getting started with create react native app to create my first react native application. But I am getting the following error -
npm start
2:11:42 PM: Starting packager... 2:11:46 PM: Error starting packager: Error: Couldn't start project. Please fix the errors and restart the project. at /xdl/src/Project.js:1039:11 at Generator.next (<anonymous>) at step (/Users/xyz/my-app/node_modules/xdl/build/Project.js:1461:191) at /Users/xyz/my-app/node_modules/xdl/build/Project.js:1461:361 at <anonymous> npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! my-app@0.1.0 start: `react-native-scripts start` npm ERR! Exit status 1 npm ERR! Failed at the my-app@0.1.0 start script.
The line of code this trace is referring to in the file Project.js
-
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
As suggested here npm ERR! code ELIFECYCLE I've tried to do a npm run clean
and delete node_modules and npm install
. But that didn't help either.
Version details -
➜ npm -v
5.0.1
➜ node -v
v8.0.0