Unable to resolve fusioncharts module
Closed this issue · 2 comments
Hello, I am having an issue when building my react-native app for debug on android. I have followed the installation steps as outlined:
Installed react-native-fusioncharts via Yarn
Then,
Create assets folder in android/app/src/main directory if it doesn't exist.
Copy FusionCharts library in the assets folder (in most cases copy node_modules/fusioncharts folder).
Create a file named fusioncharts.html in this assets folder with the required FusionCharts module files. Find the sample html file here.
Set libraryPath property to the FusionCharts component as follows: .....
Error shown below:
jest-haste-map: @providesModule naming collision:
Duplicate module name: fusioncharts
Paths: /Users/dariusa/Desktop/ReactNative/Proj/android/app/build/intermediates/assets/debug/fusioncharts/package.json collides with /Users/dariusa/Desktop/ReactNative/Proj/android/app/src/main/assets/fusioncharts/package.json
This warning is caused by a @providesModule declaration with the same name across two different files.
error: bundling failed: Error: Unable to resolve module `./assets/fusioncharts.html` from `/Users/dariusa/Desktop/ReactNative/Proj/src/pages/TestPage.js`: The module `./assets/fusioncharts.html` could not be found from `/Users/dariusa/Desktop/ReactNative/Proj/src/pages/TestPage.js`. Indeed, none of these files exist:
* `fusioncharts.html`
* `/Users/dariusa/Desktop/ReactNative/Proj/src/pages/assets/fusioncharts.html/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)`
at ModuleResolver.resolveDependency (/Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:161:851)
at ResolutionRequest.resolveDependency (/Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:91:16)
at DependencyGraph.resolveDependency (/Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/node-haste/DependencyGraph.js:272:4579)
at dependencies.map.relativePath (/Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/DeltaBundler/traverseDependencies.js:376:19)
at Array.map (<anonymous>)
at resolveDependencies (/Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/DeltaBundler/traverseDependencies.js:374:16)
at /Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/DeltaBundler/traverseDependencies.js:212:33
at Generator.next (<anonymous>)
at step (/Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:313)
at /Users/dariusa/Desktop/ReactNative/Proj/node_modules/metro/src/DeltaBundler/traverseDependencies.js:297:473
BUNDLE [android, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.
My dependencies are as follows:
"yarn": "^1.6.0"
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-fusioncharts": "^1.0.0",
Assistance requested,
Thank you
Okay nevermind, i resolved the issue after, uninstalling the react-native-fusioncharts library and reinstalling it back, and repeating the steps of copying the assets folder again.
hello i have the same issue. I reinstall but I can't fix. Can you help me pls