React Native 0.66.4 - Invariant Violation: View config getter callback for component ...
See original GitHub issueI’ve using the RN 0.66.4 version, react-native-svg ^12.1.1 and react-native-svg-transformer ^1.0.0.
I’ve this error for all tries that I did.
Invariant Violation: View config getter callback for component `<svg width="41" height="40" viewBox="0 0 41 40" fill="none" >...` ...
must be a function (received `undefined`).
This error is located at:
in <svg ...
my metro.config.js
:
const {getDefaultConfig} = require('metro-config');
module.exports = (async () => {
const {
resolver: {sourceExts, assetExts},
} = await getDefaultConfig();
return {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};
})();
So, the react-native-svg-transformer is not available for this version?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (4 by maintainers)
Top Results From Across the Web
view config getter callback for component 'div' must be a ...
Sometimes this error occurs when the import of your component is not correct. In my react-native project, FlatList got imported from ...
Read more >React Native: View config getter callback for component must ...
You're coding a React Native App and suddenly get an unexpected error: Invariant Violation: View config getter callback for component `div` must be...
Read more >Invariant Violation: View config getter callback for component ...
I am using Android in windows enviroment for build the app. The exemple app by the libary runing in my machine. By with...
Read more >Am i losing it ? I think i'm losing it. : r/reactnative - Reddit
"Invariant Violation: View config getter callback for component ... Why is the react native vector icons module README like 20000 char long ...
Read more >Troubleshooting | React Navigation
Missing extensions in metro configuration. Sometimes the error may look like this: Error: While trying to resolve module "@react-navigation/native ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DwCleb sorry for the late response, but I had a look at your project, and it’s the
babel-plugin-inline-import
that is messing things up. I tried removing that Babel plugin from your project and it fixed the error.Same problem, but this does not fix it for me; any idea what else could cause this?