Open SoheilY opened 4 days ago
What happens if you run npx expo export:embed --eager --platform android --dev false
locally?
What happens if you run
npx expo export:embed --eager --platform android --dev false
locally?
$ npx expo export:embed --eager --platform android --dev false
Starting Metro Bundler
Error: Unable to resolve module ./D:/Projects/german-term-new-arch/node_modules/expo-router/entry.js from D:\Projects\german-term-new-arch/.:
None of these files exist:
* D:\Projects\german-term-new-arch\node_modules\expo-router\entry.js(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css|.android.css|.native.css|.css)
* D:\Projects\german-term-new-arch\node_modules\expo-router\entry.js
Error: Unable to resolve module ./D:/Projects/german-term-new-arch/node_modules/expo-router/entry.js from D:\Projects\german-term-new-arch/.:
None of these files exist:
* D:\Projects\german-term-new-arch\node_modules\expo-router\entry.js(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css|.android.css|.native.css|.css)
* D:\Projects\german-term-new-arch\node_modules\expo-router\entry.js
at ModuleResolver.resolveDependency (D:\Projects\german-term-new-arch\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:112:15)
at DependencyGraph.resolveDependency (D:\Projects\german-term-new-arch\node_modules\metro\src\node-haste\DependencyGraph.js:235:43)
at D:\Projects\german-term-new-arch\node_modules\metro\src\lib\transformHelpers.js:160:21
at Server._resolveRelativePath (D:\Projects\german-term-new-arch\node_modules\metro\src\Server.js:1104:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at MetroBundlerDevServer.resolveRelativePathAsync (D:\Projects\german-term-new-arch\node_modules\@expo\cli\src\start\server\metro\MetroBundlerDevServer.ts:1677:12)
at MetroBundlerDevServer.metroLoadModuleContents (D:\Projects\german-term-new-arch\node_modules\@expo\cli\src\start\server\metro\MetroBundlerDevServer.ts:506:35)
at MetroBundlerDevServer.legacySinglePageExportBundleAsync (D:\Projects\german-term-new-arch\node_modules\@expo\cli\src\start\server\metro\MetroBundlerDevServer.ts:809:20)
at exportEmbedBundleAndAssetsAsync (D:\Projects\german-term-new-arch\node_modules\@expo\cli\src\export\embed\exportEmbedAsync.ts:193:21)
at exportEmbedInternalAsync (D:\Projects\german-term-new-arch\node_modules\@expo\cli\src\export\embed\exportEmbedAsync.ts:125:37)
I checked the mentioned path and entry.js file exists despite the error.
It doesn't seem to work too well on Windows 😅. I will let Expo CLI folks know about it.
Do you use CNG? If so it would be good to add the ./android'
and ./ios
directories to your .gitignore
file so we run a clean prebuild during the build process. I believe it can help with this issue because the prebuild will be run on Linux then.
It doesn't seem to work too well on Windows 😅. I will let Expo CLI folks know about it.
Thanks!
Do you use CNG? If so it would be good to add the
./android'
and./ios
directories to your.gitignore
file so we run a clean prebuild during the build process. I believe it can help with this issue because the prebuild will be run on Linux then.
I tried adding ./android'
and ./ios
to .gitignore
and it still didn't work.
I made a copy of project again, deleted everything related to nativewind and no longer got the error. It seems nativewind requires lightningcss and I guess it is related to cssInterop
function.
Although as a workaround to building without removing nativewind, I added lightningcss-linux-x64-gnu
as a dev dependency to my package.json
and removed package-lock.json
file before running eas build -p android --profile preview
command and build was successful.
Build/Submit details page URL
https://expo.dev/accounts/soheilxpawn/projects/german-term-new-arch/builds/5647d5e9-5f71-4327-93d8-034e78f1a281
Summary
I want to build an APK of my app for android with "eas build -p android --profile preview" command but in EAS I get error in bundle javascript step:
Error: Cannot find module '../lightningcss.linux-x64-gnu.node'
I don't get this error using "npx expo run:android" command and app works without any errors in android emulator.
Managed or bare?
Bare
Environment
npx expo-env-info:
npx expo-doctor:
Error output
No response
Reproducible demo or steps to reproduce from a blank project
eas.json:
package.json:
metro.config.js: