Closed Steffi3rd closed 5 years ago
react-native start --reset-cache
We have to clean cache by using this : react-native start --reset-cache
instead yarn clean cache
https://github.com/facebook/react-native/issues/1924
And the configuration which works is : Config 3
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
root: ['./peperonnie'],
extensions: ['.ios.js', '.android.js', '.js', '.json'],
}
]
]
};
I would suggest using this with React Native: https://medium.com/beqode/fixing-import-path-hell-react-native-eslint-vs-code-3d04de9762b6
Found the solution :
react-native start --reset-cache
We have to clean cache by using this :
react-native start --reset-cache
insteadyarn clean cache
Thank you @Steffi3rd, worked for me!
With Expo we can use expo start -c
or expo start --clear
Found the solution :
react-native start --reset-cache
We have to clean cache by using this :
react-native start --reset-cache
insteadyarn clean cache
And the configuration which works is : Config 3
module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'module-resolver', { root: ['./peperonnie'], extensions: ['.ios.js', '.android.js', '.js', '.json'], } ] ]
};
Great! 2023 and I'm pretty sure this should be in the documentation...
yarn start
always failed by the same error. It was unable to resolve pathscreens
. I also cleaned cacheyarn clean cache
I tried many config of
babel.config.js
, it always fails : (btw I don't use.babelrc
, his content is in the defaultbabel.config.js
)My tree
I use it like this
Config 1 :
Config 2 :
Config 3 :
Config 4 : (without root)
Error
package.json