Skip to content

Commit

Permalink
Add solution of entry point not exist error for Expo on macOS to Know…
Browse files Browse the repository at this point in the history
…n issues for master branch (microsoft#1338)

* Add solution of entry point not exist error for Expo on macOS to Known issues (microsoft#1337)

* add lines to content of metro.config.json in smoke tests and add description of error to known issues in readme

* Update README.md

Co-authored-by: Yuri Skorokhodov <v-yuskor@microsoft.com>

* Update test/smoke/package/src/helpers/setupEnvironmentHelper.ts

Co-authored-by: Yuri Skorokhodov <v-yuskor@microsoft.com>

* Update test/smoke/package/src/helpers/setupEnvironmentHelper.ts

Co-authored-by: Yuri Skorokhodov <v-yuskor@microsoft.com>

Co-authored-by: Yuri Skorokhodov <v-yuskor@microsoft.com>

* Apply suggestions from code review

Co-authored-by: RedMickey <33267199+RedMickey@users.noreply.github.com>

Co-authored-by: Yuri Skorokhodov <v-yuskor@microsoft.com>
Co-authored-by: RedMickey <33267199+RedMickey@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 8, 2020
1 parent 166908e commit 3ea567c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -503,7 +503,8 @@ Debugger doesn't stop at breakpoints | Breakpoints require sourcemaps to be corr
'adb: command not found' | If you receive an error `adb: command not found`, you need to update your system Path to include the location of your *ADB* executable.The *ADB* executable file is located in a subdirectory along with your other Android SDK files.
Targeting iPhone 6 doesn't work | There was a known issue with React Native ([#5850](https://github.com/facebook/react-native/issues/5850)) but it was fixed. Please upgrade your version of React Native.
Can't communicate with socket pipe | (Linux only) If you have two workspaces open that only differ in casing, the extension will fail to communicate effectively.
"Add configuration" button doesn't work when trying to add debug configuration to `launch.json` | You may need to have to add in some json to `launch.json` manually. Please, see ([#985](https://github.com/Microsoft/vscode-react-native/issues/985))
"Add configuration" button doesn't work when trying to add debug configuration to `launch.json` | You have to add some json configuration to `launch.json` manually. Please, see ([#985](https://github.com/Microsoft/vscode-react-native/issues/985)).
Error `None of these files exist: * .vscode/exponentIndex` appears when running React Native apps via Expo | On some project configurations (mostly on macOS) there could be problems with running RN app via Expo for the first time. You can resolve this by explicitly adding `module.exports.watchFolders = ['.vscode'];` to your Metro config. This will help Metro bundler to find the custom entry point generated by the extension needed to work with Expo. For details you can see the issue ([#1327](https://github.com/microsoft/vscode-react-native/issues/1327)).

[Known-Issues](https://github.com/Microsoft/vscode-react-native/issues?q=is%3Aissue+label%3Aknown-issues) provides a complete list of active and resolved issues.

Expand Down
6 changes: 5 additions & 1 deletion test/smoke/package/src/helpers/setupEnvironmentHelper.ts
Expand Up @@ -252,7 +252,11 @@ module.exports.cacheStores = [
];
// Redirect Haste Map cache
module.exports.hasteMapCacheDirectory = ".cache";`;
module.exports.hasteMapCacheDirectory = ".cache";
// Due to the fact that Metro bundler on MacOS has problems with scanning files and folders starting with a dot (hidden folders), for example './vscode',
// the first time when the packager starts, it cannot find the './vscode/exponentIndex.js' file. So we add this folder to scanning manually.
module.exports.watchFolders = ['.vscode'];`;
fs.appendFileSync(metroConfigPath, patchContent);
const contentAfterPatching = fs.readFileSync(metroConfigPath);
console.log(`*** Content of a metro.config.js after patching: ${contentAfterPatching}`);
Expand Down

0 comments on commit 3ea567c

Please sign in to comment.