New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the Haste package 'react-native-vector-icons' #630

Closed
junge68 opened this Issue Jan 17, 2018 · 28 comments

Comments

Projects
None yet
@junge68
Copy link

junge68 commented Jan 17, 2018

error: bundling failed: Error: While resolving module react-native-vector-icons /Ionicons, the Haste package react-native-vector-icons was found. However the
module Ionicons could not be found within the package.

@tysoncadenhead

This comment has been minimized.

Copy link

tysoncadenhead commented Jan 17, 2018

I'm seeing this too as of today. It appears to be a new issue.

error: bundling failed: Error: While resolving module react-native-vector-icons/FontAwesome, the Haste package react-native-vector-iconswas found. However the moduleFontAwesome could not be found within the package. Indeed, none of these files exist:

@mars-lan

This comment has been minimized.

Copy link

mars-lan commented Jan 17, 2018

Same as #626?

@junge68

This comment has been minimized.

Copy link
Author

junge68 commented Jan 17, 2018

I found the solution.Delete this file.
rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json
Delete file package.json

@callagga

This comment has been minimized.

Copy link

callagga commented Jan 17, 2018

I am see this too.

@junge68 - what would you need to clean/reset/etc to try your suggestion? I renamed the file and did a yarn cache clean, but this didn't help...

Loading dependency graph, done.
error: bundling failed: Error: While resolving module `react-native-vector-icons/MaterialIcons`, the Haste package `react-native-vector-icons` was found. However the module `MaterialIcons` could not be found within the package. Indeed, none of these files exist:

  * `/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
  * `/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
    at resolveHasteName (/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:387:9)
    at ModuleResolver._resolveDependency (/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:317:37)
    at ModuleResolver.resolveDependency (/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:313:877)
    at ResolutionRequest.resolveDependency (/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:97:16)
    at DependencyGraph.resolveDependency (/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/node-haste/DependencyGraph.js:269:4352)
    at /Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:201:36
    at Generator.next (<anonymous>)
    at step (/Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:306)
    at /Users/Greg/Dropbox/source_reactnative/gctodo_v2/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:536
    at Promise (<anonymous>)
 BUNDLE  [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓░░░░░ 73.0% (493/577), failed.

@callagga

This comment has been minimized.

Copy link

callagga commented Jan 17, 2018

update: tried again and worked (I think doing the cache cleans etc may have put the file back perhaps?)

@Torgian

This comment has been minimized.

Copy link

Torgian commented Jan 19, 2018

Also ran into this problem today. Same exact error.

Update: I deleted the JSON file at node_modules/react-native/local-cli/core/fixtures/files/package.json and restarted my project server. Works fine now.

However, I think the core issue is in the core code. Apparently this may be a bigger issue.

@fithaN

This comment has been minimized.

Copy link

fithaN commented Jan 22, 2018

Facing same issue deleting node_modules/react-native/local-cli/core/fixtures/files/package.json doesnt help.any other solution?

@mtt87

This comment has been minimized.

Copy link

mtt87 commented Jan 22, 2018

With the latest RN version 0.52.1 the file to remove is located here:
rm node_modules/react-native/local-cli/core/__fixtures__/files/package.json

@wvicioso

This comment has been minimized.

Copy link

wvicioso commented Jan 23, 2018

Lets get this change merged!!!

@ccjeaty

This comment has been minimized.

Copy link

ccjeaty commented Jan 24, 2018

rm node_modules/react-native/local-cli/core/__fixtures__/files/package.json worked for me.

@Yandamuri

This comment has been minimized.

Copy link

Yandamuri commented Jan 25, 2018

@ccjeaty is it good practice or permanent solution to this issue? Will be there be any further conflicts if proceed to do so?

@jdnichollsc

This comment has been minimized.

Copy link

jdnichollsc commented Jan 25, 2018

it's a bad practice, it's only a temporal solution...

@Yandamuri

This comment has been minimized.

Copy link

Yandamuri commented Jan 25, 2018

@jdnichollsc Thank you. Could you suggest any solution for this?

@ShooterArk

This comment has been minimized.

Copy link

ShooterArk commented Jan 25, 2018

Deleting that package.json did fix my issue but I didnt like this solution since I will have to delete it everytime I face such issue.. But anyhow thanks guys, it took me 4 hours to find this solution :P ..

@jdnichollsc

This comment has been minimized.

Copy link

jdnichollsc commented Jan 25, 2018

@Yandamuri sorry, I'm learning React Native, I don't know for the moment

@evanjmg

This comment has been minimized.

Copy link

evanjmg commented Jan 29, 2018

This needs to be fixed properly, this is a critical issue +1.

@fungilation

This comment has been minimized.

Copy link

fungilation commented Jan 31, 2018

I'm seeing this from metro-bundler:

bundling failed: Error: While resolving module react-native-vector-icons/FontAwesome, the Haste package react-native-vector-icons was found. However the module FontAwesome could not be found within the package. Indeed, none of these files exist

Similar to what others are seeing. I haven't touched or upgraded anything in react-native-vector-icons. What I changed on native side that could have triggered this is upgrading react-native-firebase, followed by a pod update.

@fungilation

This comment has been minimized.

Copy link

fungilation commented Jan 31, 2018

#630 (comment) 's solution works but obviously addressing the symptom, not the cause. This should be filed upstream to react-native? I'm not even sure how to file when it's not consistently reproducible, other than my last comment?

@MoOx

This comment has been minimized.

Copy link
Collaborator

MoOx commented Feb 2, 2018

Dup of #626
it's an RN issue facebook/react-native#17610
Will be fixed by facebook/react-native#17672
Workaround #626 (comment)

@jasonc1025

This comment has been minimized.

Copy link

jasonc1025 commented Feb 3, 2018

Thanks @MoOx for the helpful summary. :)

@Yandamuri

This comment has been minimized.

Copy link

Yandamuri commented Feb 3, 2018

@MoOx

Will be fixed by facebook/react-native#17672

is it permanent fix?

@SridharAlagirisamy

This comment has been minimized.

Copy link

SridharAlagirisamy commented Feb 7, 2018

@mtt87 Thanks it worked for me.

@MoOx

This comment has been minimized.

Copy link
Collaborator

MoOx commented Feb 8, 2018

@Yandamuri yes it will. Nothing is wrong in this package. It's RN repo that contains the name of this package (and it should not).

@trinadhkoya

This comment has been minimized.

Copy link

trinadhkoya commented Feb 20, 2018

thanks @mtt87 .It works like a charm
💯

Christianq010 added a commit to Christianq010/react-native-guide-my-app that referenced this issue May 16, 2018

@joshuapinter

This comment has been minimized.

Copy link

joshuapinter commented Jun 18, 2018

Correction: This is fixed in Version 0.54.4 of React Native

4 months later and this still isn't fixed in React Native 0.53.3.

Quick fix as others point out is to run rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json but you'll need to do this after every fresh npm install.

So, to run this automatically, you can add it to your package.json as a postinstall script:

package.json

"scripts": {
  "postinstall": "rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json"
}
@fungilation

This comment has been minimized.

Copy link

fungilation commented Jun 19, 2018

Yup, fine with me on RN 0.54.4

@13ArturBruno

This comment has been minimized.

Copy link

13ArturBruno commented Oct 5, 2018

I found the solution.Delete this file.
rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json
Delete file package.json

I delete this file but error continued. :c

@paalex

This comment has been minimized.

Copy link

paalex commented Nov 2, 2018

@13ArturBruno if on RN0.52+ you need ``rm node_modules/react-native/local-cli/core/fixtures/files/package.json`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment