I have a problem that after adding a new SVG I get an error, but before that I have already added other SVGs and everything worked.
Logs for your project will appear below. Press Ctrl+C to exit.
transform[stdout]: Error: Missed `structure` field in `UnicodeRange` node type definition
transform[stdout]: at getTypesFromConfig (C:UsersbotwiDesktopappmy-appnode_modulescssonode_modulescss-treecjswalkercreate.cjs:71:23)
transform[stdout]: at Object.createWalker (C:UsersbotwiDesktopappmy-appnode_modulescssonode_modulescss-treecjswalkercreate.cjs:153:19)
transform[stdout]: at createSyntax (C:UsersbotwiDesktopappmy-appnode_modulescssonode_modulescss-treecjssyntaxcreate.cjs:13:27)
transform[stdout]: at createSyntax$1 (C:UsersbotwiDesktopappmy-appnode_modulescssonode_modulescss-treecjssyntaxcreate.cjs:54:34)
transform[stdout]: at Object.<anonymous> (C:UsersbotwiDesktopappmy-appnode_modulescssonode_modulescss-treecjssyntaxindex.cjs:8:16)
transform[stdout]: at Module._compile (node:internal/modules/cjs/loader:1256:14)
transform[stdout]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
transform[stdout]: at Module.load (node:internal/modules/cjs/loader:1119:32)
transform[stdout]: at Module._load (node:internal/modules/cjs/loader:960:12)
transform[stdout]: at Module.require (node:internal/modules/cjs/loader:1143:19)
Android Bundling failed 2658ms
error: assetssearch.svg: Module "@svgr/plugin-svgo" missing. Maybe `npm install @svgr/plugin-svgo` could help!
*"npm install @svgr/plugin-svgo" didn’t work
The problem is not in the SVG, before I had the same problem, but I solved it simply by creating a new project and transferring everything there.
2
Answers
I use the React Native SVG and works fine.
https://www.npmjs.com/package/react-native-svg
I was having a similar issue but with css-what.
css-what was resolved to a version that is older than css-select in @svgr/plugin-svgo required. Added below packages to resolutions fixed the problem.