我刚刚更换了笔记本电脑,并将所有工具的设置移至新 Macbbok M1 上。我收到此错误,在网络上找不到任何类似的情况。捆绑时,地铁捆绑器抱怨找不到
AppEntry.js
:
+ /opt/homebrew/opt/node@18/bin/node /private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/@expo/cli/build/bin/cli export:embed --entry-file /var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js --platform ios --dev false --reset-cache --bundle-output /Users/bitoiu/Library/Developer/Xcode/DerivedData/LJJ-clzmakckjofbkdarbcbhcwzorxiv/Build/Intermediates.noindex/ArchiveIntermediates/LJJ/BuildProductsPath/Release-iphoneos/main.jsbundle --assets-dest /Users/bitoiu/Library/Developer/Xcode/DerivedData/LJJ-clzmakckjofbkdarbcbhcwzorxiv/Build/Intermediates.noindex/ArchiveIntermediates/LJJ/BuildProductsPath/Release-iphoneos/LJJ.app --minify false
Starting Metro Bundler
warning: Bundler cache is empty, rebuilding (this may take a minute)
/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/.:0: error: Unable to resolve module /var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js from /private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/.:
Error: Unable to resolve module /var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js from /private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/.:
None of these files exist:
* ../../../../../../../../../var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css)
* ../../../../../../../../../var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js/index(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css)
Error: Unable to resolve module /var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js from /private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/.:
None of these files exist:
* ../../../../../../../../../var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css)
* ../../../../../../../../../var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/expo/AppEntry.js/index(.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.mjs|.native.mjs|.mjs|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs|.ios.scss|.native.scss|.scss|.ios.sass|.native.sass|.sass|.ios.css|.native.css|.css)
at ModuleResolver.resolveDependency (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:112:15)
at DependencyGraph.resolveDependency (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
at /private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/metro/src/lib/transformHelpers.js:156:21
at Server._resolveRelativePath (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/metro/src/Server.js:1023:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at MetroBundlerDevServer.resolveRelativePathAsync (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts:1208:12)
at MetroBundlerDevServer.metroLoadModuleContents (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts:430:35)
at MetroBundlerDevServer.legacySinglePageExportBundleAsync (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/@expo/cli/src/start/server/metro/MetroBundlerDevServer.ts:553:20)
at exportEmbedBundleAndAssetsAsync (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/@expo/cli/src/export/embed/exportEmbedAsync.ts:116:21)
at exportEmbedAsync (/private/var/folders/v1/4tc4zbcn78dc64gp61qth6cr0000gn/T/eas-build-local-nodejs/b88634ff-cd0d-4097-b224-3df0ad054192/build/node_modules/@expo/cli/src/export/embed/exportEmbedAsync.ts:68:30)
warning: Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'hermes-engine' from project 'Pods')
note: Run script build phase 'Bundle React Native code and images' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'LJJ' from project 'LJJ')
note: Run script build phase '[Expo] Configure project' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'LJJ' from project 'LJJ')
warning: Run script build phase '[CP-User] [RN]Check rncore' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Fabric' from project 'Pods')
warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
我尝试删除并重建
node_modules
,并且运行 npx expo-doctor
没有显示任何问题。我真的对这个错误没有模式想法。当我月初有更多构建时,我将尝试在云上使用 EAS 进行构建。
提前谢谢您。
我在 M2 上,对这个非常着迷,应该归结为目前正在进行的这个问题:https://github.com/expo/eas-cli/issues/2449
作为 Expo 51 的解决方法,在这个精确的时刻,可以将入口点从
"main": "node_modules/expo/AppEntry.js",
到
"main": "expo/AppEntry.js",
在你的
package.json
或降级至:
"expo": "51.0.14",
(无波形符)
在
"expo": "~51.0.19",
上亲自测试了第一个解决方案,可以在任何配置文件上为Android和iOS本地构建EAS