rohanbhatia96/musicplayer-react-native

Error: While trying to resolve module `react-native-track-player`

Opened this issue · 0 comments

I'm getting this error while i'm executing this project with help of your tutorial.I'm new to this, please help me.
Screenshot from 2020-12-24 19-19-53
error: Error: While trying to resolve module react-native-track-player from file /home/robo/reactNative/ReactMusic/App.js, the package /home/robo/reactNative/ReactMusic/node_modules/react-native-track-player/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/home/robo/reactNative/ReactMusic/node_modules/react-native-track-player/index. Indeed, none of these files exist:

  • /home/robo/reactNative/ReactMusic/node_modules/react-native-track-player/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • /home/robo/reactNative/ReactMusic/node_modules/react-native-track-player/index/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    at ResolutionRequest.resolveDependency (/home/robo/reactNative/ReactMusic/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:65:15)
    at DependencyGraph.resolveDependency (/home/robo/reactNative/ReactMusic/node_modules/metro/src/node-haste/DependencyGraph.js:287:16)
    at Object.resolve (/home/robo/reactNative/ReactMusic/node_modules/metro/src/lib/transformHelpers.js:267:42)
    at /home/robo/reactNative/ReactMusic/node_modules/metro/src/DeltaBundler/traverseDependencies.js:434:31
    at Array.map ()
    at resolveDependencies (/home/robo/reactNative/ReactMusic/node_modules/metro/src/DeltaBundler/traverseDependencies.js:431:18)
    at /home/robo/reactNative/ReactMusic/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33
    at Generator.next ()
    at asyncGeneratorStep (/home/robo/reactNative/ReactMusic/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)
    at _next (/home/robo/reactNative/ReactMusic/node_modules/metro/src/DeltaBundler/traverseDependencies.js:107:9)