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
This commit is contained in:
Martín Bigio 2016-01-21 08:15:19 -08:00 committed by facebook-github-bot-4
parent f1fa67feaf
commit 6adf3a4f61
1 changed files with 7 additions and 1 deletions

View File

@ -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\`.`,
);
}