So I recently updated my expo to SDK 51 and created a new development build, but when I tried to run npx eas build --profile development-simulator --platform ios
.
For more details, I'm using NativeWind ^4.1.23.
Eas.json:
"cli": {
"version": ">= 9.2.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"development-simulator": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"simulator": true
}
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
I've ran to this error :
yarn run v1.22.21 $ /Users/expo/workingdir/build/frontend/node_modules/.bin/expo export:embed --eager --platform ios --dev false Starting Metro Bundler
tailwindcss(ios) rebuilding... done | | <--- Last few GCs ---> | | [2058:0x130008000] 51620 ms: Mark-sweep (reduce) 2030.9 (2084.3) -> 2030.9 (2084.3) MB, 1920.8 / 0.0 ms (average mu = 0.147, current mu = 0.102) allocation failure; GC in old space requested | iOS Bundling failed 89196ms node_modules/expo-router/entry.js (3958 modules)
global.css: A jest worker process (pid=2058) was terminated by another process: signal=SIGTERM, exitCode=null. Operating system logs may contain more information on why this occurred. SyntaxError: global.css: A jest worker process (pid=2058) was terminated by another process: signal=SIGTERM, exitCode=null. Operating system logs may contain more information on why this occurred. Error: A jest worker process (pid=2058) was terminated by another process: signal=SIGTERM, exitCode=null. Operating system logs may contain more information on why this occurred. at ChildProcessWorker._onExit (/Users/expo/workingdir/build/frontend/node_modules/jest-worker/build/workers/ChildProcessWorker.js:370:23) at ChildProcess.emit (node:events:517:28) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I've tried changing path to global.css but non of these examples on internet helped.
Currently the path to global.css is import "../global.css";
but still same error.
The solution was to clear out tailwind.config.js to minimum. Because I had too mane variables for many colors etc. Now it looks like this :
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: "media",
content: [
"./app/**/*.{tsx,jsx,ts,js}",
"./components/**/*.{tsx,jsx,ts,js}",
"./global.css",
],
presets: [require("nativewind/preset")],
theme: {
extend: {
fontFamily: {
heading: ["Poppins", "sans-serif"],
body: ["Poppins", "sans-serif"],
poppins: ["Poppins", "sans-serif"],
poppinsLight: ["Poppins--Light", "sans-serif"],
poppinsSemiBold: ["Poppins--SemiBold", "sans-serif"],
poppinsBold: ["Poppins--Bold", "sans-serif"],
},
fontSize: {
"2xs": "10px",
},
boxShadow: {
"hard-1": "-2px 2px 8px 0px rgba(38, 38, 38, 0.20)",
"hard-2": "0px 3px 10px 0px rgba(38, 38, 38, 0.20)",
"soft-1": "0px 0px 10px rgba(38, 38, 38, 0.1)",
"soft-2": "0px 0px 20px rgba(38, 38, 38, 0.2)",
},
},
},
plugins: [],
};