描述
在将 hermesEnabled 设置为 true 的情况下在构建期间获取以下消息('...' 代表删除的文本):
(完整的错误日志在这里)
android\app\build\generated\assets\react\release\index.android.bundle:13:134: warning: the variable "Promise" was not declared in function "isBoldTextEnabled"
...
android\app\build\generated\assets\react\release\index.android.bundle:27:2907: warning: the variable "DebuggerInternal" was not declared in function "value 14#"
...
android\app\build\generated\assets\react\release\index.android.bundle:92:57773: warning: the variable "setTimeout" was not declared in function "wi"
...
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open 'android\app\build\intermediates\sourcemaps\react\release\index.android.bundle.packager.map'
at Object.openSync (fs.js:443:3)
at Object.readFileSync (fs.js:343:35)
at Object.<anonymous> (C:\esites-grocery\test2.hermes\plumpclient\node_modules\react-native\scripts\compose-source-maps.js:33:43)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
FAILURE: Build failed with an exception.
* Where:
Script 'node_modules\react-native\react.gradle' line: 191
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'cmd'' finished with non-zero exit value 1
(引用的文件存在,至少在构建失败之后)。
环境
- 在 Windows 10 上构建
- React Native 版本:0.62.2
我试图做的
- 按照https://github.com/facebook/react-native/issues/25927#issuecomment中的建议,尝试将 soLoader 提升到 0.8.0 和 0.8.2(尽管在 RN 0.62.2 中不需要这样做)-539415154