I have a project generated using expo-cli & uses SDK 32.
So I happened to remove react-native-svg using npm uninstall during debugging, and now stuck on how to bring it back. (Before that I installed react-native-svg by accident when trying to setup react-native-fontawesome…)
Now react-native-svg can no longer be resolved:
Unable to resolve "react-native-svg" from "node_modules/@fortawesome/react-native-fontawesome/dist/converter.js"
...
Module 'react-native-svg' does not exist in the Haste module map
I have tried rm -rf node_modules && npm install to reinstall the whole project, but react-native-svg was not installed when I do this.
(I compared the result to another fresh inited project; in the fresh inited one react-native-svg is installed under node_modules directly, and everything works properly)
Do npm install react-native-svg --no-save by hand is also obviously not a solution (also, version is matched with the one in the fresh inited project):
Tried to register two views with the same name RNSVGPath
Question: is there a way to reinstall react-native-svg properly, so it’s just as installed through expo init?
(Otherwise I guess the final resort is to init the project again and move everything by hand…)
Deleting the whole node_modules & copy it from the fresh inited project, then npm install other packages I added by hand, results in this:
Unable to resolve "react-native-svg" from "node_modules/@fortawesome/react-native-fontawesome/dist/converter.js"
cp -R only the react-native-svg folder from the fresh inited project node_modules gives this:
Tried to register two views with the same name RNSVGPath
...
register
ReactNativeViewConfigRetistry.js:76:1234:
<unknown>
Path.js:28:41
loadModuleImplementation
require.js:292:12
<unknown>
Rect.js:2
You can not just copy the node Mods from the FD project to the node Mods of your actual [project] Im just wondering. I have law firms that have the same issue. I was checking out for my law firm to see what they were trying to do. None of my Attorneys could figure it out.