NativeBase: Unable to resolve mapPropsToStyleNames
react-native, react and native-base version
"native-base": "2.4.5",
"react": "16.4.0",
"react-native": "0.55.4",
Expected behaviour
No errors
Actual behaviour
Unable to resolve ../utils/mapPropsToStyleNames" from ".//node_modules/native-base/dist/src/basic/View.js`: The module `../utils/mapPropsToStyleNames` could not be found"
Steps to reproduce (code snippet or screenshot)
Screenshot of emulator/device
Is the bug present in both ios and android or in any one of them?
Using iOS simulator. I haven’t tried Android, but I would assume it happens there too.
Any other additional info which would help us debug the issue quicker.
Just booting the project from yarn start and I get this. Running on MacOS 10.13.4
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 19 (7 by maintainers)
I found a folder that named
Utilsin thenode_modules/native-base/dist/srcinsteadutils(they are different of letter case)I’m hitting the same issue. Upgraded from 2.4.2 to 2.4.5 and I have “Utils” not “utils” in my path, so getting same error:
The module `../utils/mapPropsToStyleNames` could not be foundFilesystem has:
I had to yarn remove native-base then yarn add native-base to get the proper file structure (
utils). I think the upgrade from 2.4.2 to 2.4.5 just didn’t rename the folder properly.I had the same issue with a fresh install of native base. Only renaming the Utils folder to utils helped.
you can rename folder from Utils to utils by yourself as temporary fix
@jwoertink Try clearing cache before run
npm start -- --reset-cache#1856
I just ran into this issue when upgrading from 2.3 -> 2.8.1. I suspect it’s an issue with npm or yarn caching modules because it was resolved when I wiped my npm cache then reinstalled 2.8.1.
In that case, @lonewolfffffff i will try to reproduce it by your way