Skip to content
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
Closed

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

junge68 opened this issue Jan 17, 2018 · 28 comments

Comments

@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
Copy link

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
Copy link
Contributor

Same as #626?

@junge68
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
Copy link

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
Copy link

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

@Torgian
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
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
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
Copy link

Lets get this change merged!!!

@ccjeaty
Copy link

ccjeaty commented Jan 24, 2018

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

@Yandamuri
Copy link

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

@jdnichollsc
Copy link

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

@Yandamuri
Copy link

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

@ShooterArk
Copy link

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
Copy link

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

@evanjmg
Copy link

evanjmg commented Jan 29, 2018

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

@fungilation
Copy link

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
Copy link

#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
Copy link
Contributor

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
Copy link

Thanks @MoOx for the helpful summary. :)

@Yandamuri
Copy link

Yandamuri commented Feb 3, 2018

@MoOx

Will be fixed by facebook/react-native#17672

is it permanent fix?

@SridharAlagirisamy
Copy link

@mtt87 Thanks it worked for me.

@MoOx
Copy link
Contributor

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
Copy link

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
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
Copy link

Yup, fine with me on RN 0.54.4

@13arturbruno
Copy link

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
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
Projects
None yet
Development

No branches or pull requests