question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working with `eas build`

See original GitHub issue

I have followed the installation steps using babel. My app is working perfectly in development. When trying to run in release mode, the app launches with an empty screen.

If I replace:

<TailwindProvider>
  <App />
</TailwindProvider>

with a simple <View style={{flex: 1, backgroundColor: "red"}} />

the app behaves as expected.

Is there something I am missing?

babel.config.js

module.exports = {
  presets: ["module:metro-react-native-babel-preset"],
  plugins: [
    "inline-dotenv",
    "react-native-reanimated/plugin",
    "tailwindcss-react-native/babel",
  ],
};

metro.config.js

// const { createMetroConfiguration } = require("expo-yarn-workspaces");

// module.exports = createMetroConfiguration(__dirname);

// Learn more https://docs.expo.dev/guides/monorepos
const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");

const projectRoot = __dirname;
const workspaceRoot = path.resolve(projectRoot, "../..");

const config = getDefaultConfig(projectRoot);

config.watchFolders = [workspaceRoot];
config.resolver.nodeModulesPath = [
  path.resolve(projectRoot, "node_modules"),
  path.resolve(workspaceRoot, "node_modules"),
];

module.exports = config;
"tailwindcss-react-native": "^1.7.10"

Adding more info after @jmeistrich comment -

tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./App.{js,jsx,ts,tsx}", "./src/**/*.{js,jsx,ts,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [],
};

I am using eas build to create builds and eas update to release OTA updates.

The build created by eas build has the issue. If I push an update using eas update, the app starts working fine again.

Screenshot development eas run:ios Simulator Screen Shot - iPhone 8 - 2022-06-24 at 20 19 44

Screenshot simulator build eas build --local Simulator Screen Shot - iPhone 8 - 2022-06-24 at 20 59 48

Screenshot after ota update eas update has been downloaded on simulator Simulator Screen Shot - iPhone 8 - 2022-06-24 at 21 05 40

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
jmeistrichcommented, Jun 24, 2022

I don’t actually know how to solve it 😆 . I just thought @marklawlor would want to see that.

1reaction
marklawlorcommented, Jun 26, 2022

@chetankumar01 I am unable to replicate your issue, can you please create a public repo that demonstrates the issue.

You can also see project I used for testing https://github.com/marklawlor/tailwindcss-react-native-issue-88.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting build errors and crashes - Expo Documentation
Go to your build details page (find it on the build dashboard if you don't have it open already) and expand any failed...
Read more >
Android build failed using eas build. · Issue #1101 · expo/eas-cli
Gradle detected a problem with the following location: '/home/expo/workingdir/build/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses ...
Read more >
EAS build failed with error code 1 but Expo Build succeeds, i ...
This Error will be solved by doing EAS build as it removes the unused packages and you are good to go to publish...
Read more >
Problems building on eas-cli [resolved] - The Draftbit Community
This was causing issues in my builds because eas-cli couldn't find some of my screens. I fixed this by making a brand new...
Read more >
EAS build support for Mac M1 | Voters - Expo - Canny
eas build --local. on a M1 Mac, then your build will fail with error code 65. My solution for this problem was the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found