admin管理员组文章数量:1334419
When I launch :
react-native bundle --entry-file='index.js' --bundle-output='./ios/MyProject/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
I have an error which says that :
Unable to resolve module `util` from `/Users/canatac/RNProjects/<MyProject>/node_modules/<A_Module>/lib/Bot.js`: Module `<A_Module>` does not exist in the Haste module map.
But what is a Haste module map ?
When I launch :
react-native bundle --entry-file='index.js' --bundle-output='./ios/MyProject/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
I have an error which says that :
Unable to resolve module `util` from `/Users/canatac/RNProjects/<MyProject>/node_modules/<A_Module>/lib/Bot.js`: Module `<A_Module>` does not exist in the Haste module map.
But what is a Haste module map ?
Share Improve this question edited Jan 7, 2019 at 8:18 wscourge 11.3k17 gold badges63 silver badges86 bronze badges asked Jun 30, 2018 at 17:16 Jan ATACJan ATAC 1,2621 gold badge18 silver badges37 bronze badges 1- 4 This is driving me nuts. I'm getting a similar error and for the life of me I cant find any documentation on this "Haste Module Map" , what it does, or how to fix it.. This is why these JS frameworks drive me so nuts. The whole damn ecosystem is bonkers – Shayne Commented Jan 29, 2019 at 13:29
2 Answers
Reset to default 1Same error occured for me once, and that Github thread has helped me.
I had a similar problem - what helped was running npm start -- --reset-cache mand.
Based on the question itself, it is somehow connected to /tmp/haste-map-react-native-packager-*
, ergo React Native Packager.
I may found an interpretation. Haste is a deprecated Facebook dependency management system for static resources as this GitHub repo suggests.
This post in SO tells us Haste is an alternative to Node.
Then, I may conclude that a Haste Map is a map of all static dependency references of a node project AND as a deprecated system must be avoided in favor of Node module system.
本文标签: javascriptWhat is the Haste module map in nodejsStack Overflow
版权声明:本文标题:javascript - What is the Haste module map in node.js? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742269736a2444078.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论