react-nativeexpotailwind-cssnativewind

Getting Error: "Use process(css).then(cb) to work with async plugins"


screens/HomeScreen.js: Use process(css).then(cb) to work with async plugins

Here is my HomeScreen.js

import { View, Text } from 'react-native'
import React from 'react'

export default function HomeScreen() {
  return (
    <View>
      <Text className="text-red">HomeScreen</Text>
    </View>
  )
}

I am trying to use tailwindcss in React Native with Nativewind. Here is the link I am following.


Solution

  • I solved this error by changing the version to 3.3.2 and using yarn instead of npm.

    Here are the commands I followed:

    yarn add nativewind
    yarn add --dev tailwindcss@3.3.2