启动React Native packager时出错#34;找不到模块metro-bundler"

时间:2017-07-11 05:16:04

标签: react-native yarnpkg

我有一个简单的React Native项目,可以在我创建它的原始机器上正常工作,但是当我在另一台机器上克隆git repo并尝试运行iOS项目时,我在启动打包器时遇到此错误:< / p>

module.js:471
    throw err;
    ^

Error: Cannot find module 'metro-bundler/build/lib/formatBanner'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (.../node_modules/react-native/local-cli/server/checkNodeVersion.js:12:20)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
Process terminated. Press <enter> to close the window

该项目位于GitHub here。我故意没有忽略node_modules文件夹,因为这个项目对React Native本身有一些细微的修改。我似乎删除了node_modulesyarn install它解决了这个问题,但我想让GitHub回购处于你可以克隆的状态,而你不需要运行任何东西设置依赖关系。

0 个答案:

没有答案