From 6adf3a4f61e83b34ea1656f524d177c068dce777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Bigio?= Date: Thu, 21 Jan 2016 08:15:19 -0800 Subject: [PATCH] Improve error message Summary: There's a long standing issue on open source (https://github.com/facebook/react-native/issues/4968). Until someone gets some free bandwidth to fix it lets at the very least improve the error message to guide users to the issue and suggest workarounds. public Reviewed By: mkonicek Differential Revision: D2849051 fb-gh-sync-id: ef7913442ceabcab2076141bd13ab1ceeb529759 --- .../DependencyGraph/ResolutionRequest.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js b/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js index 50a59025..65742f1a 100644 --- a/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js +++ b/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js @@ -372,7 +372,13 @@ class ResolutionRequest { throw new UnableToResolveError( fromModule, toModule, - `Invalid directory ${potentialDirPath}`, +`Invalid directory ${potentialDirPath} + +This might related to https://github.com/facebook/react-native/issues/4968 +To resolve try the following: + 1. Clear watchman watches: \`watchman watch-del-all\`. + 2. Delete the \`node_modules\` folder: \`rm -rf node_modules && npm install\`. + 3. Reset packager cache: \`rm -fr $TMPDIR/react-*\` or \`npm start -- --reset-cache\`.`, ); }