我有一个 Expo 应用程序,在构建时出现错误。在 expodev 网站的日志中,内容如下:
UP-TO-DATE
> Task :react-native-community_slider:prepareReleaseArtProfile
> Task :react-native-gesture-handler:packageReleaseAssets
> Task :react-native-community_slider:mergeReleaseJavaResource
> Task :react-native-gesture-handler:prepareLintJarForPublish UP-TO-DATE
> Task :react-native-gesture-handler:prepareReleaseArtProfile
> Task :react-native-community_slider:syncReleaseLibJars
> Task :react-native-community_slider:bundleReleaseLocalLintAar
> Task :react-native-community_slider:extractProguardFiles
> Task :react-native-community_slider:writeReleaseLintModelMetadata
> Task :react-native-gesture-handler:mergeReleaseJavaResource
> Task :react-native-gesture-handler:syncReleaseLibJars
> Task :react-native-gesture-handler:bundleReleaseLocalLintAar
> Task :app:createBundleReleaseJsAndAssets
Android Bundling failed 82561ms node_modules/expo-router/entry.js (1689 modules)
TypeError: (0 , sourceMapString_1.default) is not a function
TypeError: (0 , sourceMapString_1.default) is not a function
at Chunk.serializeToAssetsAsync (/home/expo/workingdir/build/node_modules/@expo/metro-config/src/serializer/serializeChunks.ts:455:24)
at /home/expo/workingdir/build/node_modules/@expo/metro-config/src/serializer/serializeChunks.ts:621:25
at Array.map (<anonymous>)
at serializeChunksAsync (/home/expo/workingdir/build/node_modules/@expo/metro-config/src/serializer/serializeChunks.ts:619:17)
at graphToSerialAssetsAsync (/home/expo/workingdir/build/node_modules/@expo/metro-config/src/serializer/serializeChunks.ts:150:26)
at /home/expo/workingdir/build/node_modules/@expo/metro-config/src/serializer/withExpoSerializers.ts:263:50
at serializer (/home/expo/workingdir/build/node_modules/@expo/metro-config/src/serializer/withExpoSerializers.ts:296:12)
at MetroBundlerDevServer._bundleDirectAsync (/home/expo/workingdir/build/node_modules/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts:1026:28)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at MetroBundlerDevServer.metroLoadModuleContents (/home/expo/workingdir/build/node_modules/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts:442:21)
> Task :react-native-community_slider:generateReleaseLintModel
> Task :app:createBundleReleaseJsAndAssets FAILED
> Task :react-native-gesture-handler:extractProguardFiles
> Task :react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]
> Task :expo-modules-core:buildCMakeRelWithDebInfo[arm64-v8a]
FAILURE:
Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
>
Process 'command 'node'' finished with non-zero exit value 1
* Try:
>
Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 5m 48s
534 actionable tasks: 518 executed, 16 up-to-date
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
我做了./gradlew clean,我还做了./gradlew assembleDebug,它说构建成功,但是将构建发送到展会现场时出现错误。
(首先我的英语很差,抱歉)当前的世博会站点在缓存中使用了库,但显然这个库已损坏,我们必须等待更新,这是我所能找到的。
我今天早上开始遇到这个问题,我花了几个小时,直到我在今天开放的博览会上发现这个问题:https://github.com/expo/expo/issues/30898
它有和我和你一样的问题日志,答案很快就会到来
这里同样的错误。使用 eas online 和 --local。
我以为是哨兵或我更改的东西来生成当前版本,所以我将更改保留在 stash 中并正常运行命令,同样的错误
可能是世博会本身的一些场景