undefinedfix
Sign in

Error report in building react native development environment for MAC system

user617611 edited in Fri, 25 Nov 2022

When NPX react native init awesomeprojectcd awesomeproject yarn react native run IOS is executed in the process of building react native development environment of MAC system, the error log is as follows

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.

How to solve this problem?

0 Replies