mirror of https://github.com/status-im/metro.git
bb1666a93a
Summary: We could probably relieve a lot of pain (in [this issue](https://github.com/facebook/react-native/issues/4968) specifically) by fixing the error message for when a module cannot be resolved after trying every relevant `node_modules` directory. Currently, you get a confusing error message that only gives you the last `node_modules` directory checked. By creating the error message where we can access the `searchQueue`, we're able to provide all of the attempted `node_modules` directories. Here's an example error message: ``` Unable to resolve module leftpad from /Users/aleclarson/ReactProject/src/stuff/index.js: Module does not exist in the module map or as these directories: /Users/aleclarson/ReactProject/src/stuff/node_modules/leftpad /Users/aleclarson/ReactProject/src/node_modules/leftpad /Users/aleclarson/ReactProject/node_modules/leftpad /Users/aleclarson/node_modules/leftpad /Users/node_modules/leftpad ``` Closes https://github.com/facebook/react-native/pull/9832 Differential Revision: D3895408 Pulled By: davidaurelio fbshipit-source-id: 872c9a3bb3633f751ec69b586a261616578ed511 |
||
---|---|---|
.. | ||
src | ||
.npmignore | ||
index.js | ||
rn-babelrc.json |