Mac系统搭建react-native开发环境过程中执行
npx react-native init AwesomeProject
cd AwesomeProject yarn react-native run-ios报错
错误日志如下
error: bundling failed: ReferenceError: SHA-1 for file /Users/xxx/AwesomeProject/node_modules/metro/src/lib/polyfills/require.js (/Users/xxx/AwesomeProject/node_modules/metro/src/lib/polyfills/require.js) is not computed
at DependencyGraph.getSha1 (/Users/xxx/AwesomeProject/node_modules/metro/src/node-haste/DependencyGraph.js:258:13)
at /Users/xxx/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:211:26
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/xxx/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:46:24)
at _next (/Users/xxx/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:66:9)
at /Users/xxx/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:71:7
at new Promise (<anonymous>)
at /Users/xxx/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:63:12
at Transformer.transformFile (/Users/xxx/AwesomeProject/node_modules/metro/src/DeltaBundler/Transformer.js:236:7)
at /Users/xxx/AwesomeProject/node_modules/metro/src/Bundler.js:87:34
BUNDLE [android, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (457/457), failed.
请问如何解决?