Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Haste module map in node.js?

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 ?

like image 251
Jan ATAC Avatar asked Jun 30 '18 17:06

Jan ATAC


1 Answers

Same 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 command.

Based on the question itself, it is somehow connected to /tmp/haste-map-react-native-packager-*, ergo React Native Packager.

like image 200
wscourge Avatar answered Nov 15 '22 09:11

wscourge