I have installed the 'react-native-auto-scrolling` package and I get the following error:
error: Metro has encountered an error: While trying to resolve module 'react-native-auto-scrolling' from file '.....\Home.js', the package '......\node_modules\react-native-auto-scrollinge\package.json' was successfully found. However, this package itself specifies a 'main' module field that could not be resolved ('......\node_modules\react-native-auto-scrollinge\dist\index.js'.
I have tried to fix this by adding in the metro.config.js
the following code:
resolver: { sourceExts: ['jsx', 'js', 'ts', 'tsx'],},
under module.exports
(as I found that the Metro
doesn't know how to compile by default .tsx
) but I still cannot use the package, as it returns me the same error when trying to run react-native run-android
. As I checked node-modules
for the package, I have discovered that the package is created using typescript
.