When I run npm run ios in terminal, I get the below error
error: node_modules/expo-router/entry.js: [BABEL]: expo-router/babel is deprecated in favor of babel-preset-expo in SDK 50
I tried to install babel-preset-expo, but it was already installed
When I run npm run ios in terminal, I get the below error
error: node_modules/expo-router/entry.js: [BABEL]: expo-router/babel is deprecated in favor of babel-preset-expo in SDK 50
I tried to install babel-preset-expo, but it was already installed
On
I tried the above answers and didnt work. This is how I have done it.
The Error actually says to use babel-preset-expo instead. So
run this:
npm install --save-dev babel-preset-expo
update the babel.config.js
module.exports = function(api) {
api.cache(true);
const presets = ['babel-preset-expo'];
return {
presets,
};
};
then clear cache:
npx expo start --clear
Removed the expo-router/babel from babel.config.js file and it works.