Nam*_*man 4 node.js npm react-native
我正在遵循create react native应用程序入门,以创建我的第一个react native应用程序。但我收到以下错误-
npm start
Run Code Online (Sandbox Code Playgroud)
Run Code Online (Sandbox Code Playgroud)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.
此跟踪在文件中引用的代码行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"); }); }; }
Run Code Online (Sandbox Code Playgroud)
正如这里建议的npm ERR!代码ELIFECYCLE我试图做一个npm run clean并删除node_modules和npm install。但这也无济于事。
版本详细信息-
? npm -v
5.0.1
? node -v
v8.0.0
Run Code Online (Sandbox Code Playgroud)
React代码应该没问题。
您是否可能将项目移动到另一个文件夹? github上的类似问题
请尝试以下操作:
rm -rf node_modulesnpm install| 归档时间: |
|
| 查看次数: |
7873 次 |
| 最近记录: |