I am trying to get Nativewind to work on my expo react-native project. But i keep getting the following error:
iOS Bundling failed 3618ms (C:\Documents\project\node_modules\expo-router\entry.js) error: app\index.jsx: [BABEL] C:\Documents\project\app\index.jsx: .plugins is not a valid Plugin property
This is my babel.config.js
// babel.config.js
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: ["nativewind/babel"], //The error no longer appears if I comment out this line.
};
};
And my tailwind.config.js
// tailwind.config.js
module.exports = {
content: ["./app/**/*.{js,jsx,ts,tsx}", "./components/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
};
I have tried removing the plugins property, but then nativewind doesnt work. I am following along with the nativewind quick start documentation but haven't seen any mention of this kind of issue.
It appears like there could be an issue with how the nativewind/babel plugin is designed in your Expo Respond Local venture.
// babel.config. js module.exports = work (api) {api.cache(true); return {presets:["babel- preset- expo"],plugins:["babel - plugin - native wind"], // Overhaul this line};};
1.Check Conditions: Make beyond any doubt all conditions, counting babel- plugin- native wind, are correctly introduced and up to date. You'll be able attempt expelling the node_modules registry and reinstalling conditions by running npm introduce or yarn introduce. 2.Expo Compatibility: Affirm that the native wind bundle is consistent with Expo ventures. Now and then, certain libraries or plugins may not be completely congruous with Expo's overseen workflow. 3. Expo Documentation: Check the Expo documentation or community gatherings to see in case there are any known issues or arrangements related to utilizing native wind with Expo ventures.