Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native bundler no longer scans for symlinks in node_modules #21735

Closed
2 of 3 tasks
peat-psuwit opened this issue Oct 11, 2018 · 4 comments
Closed
2 of 3 tasks

React Native bundler no longer scans for symlinks in node_modules #21735

peat-psuwit opened this issue Oct 11, 2018 · 4 comments
Labels
Bug Platform: Linux Building on Linux. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@peat-psuwit
Copy link
Contributor

peat-psuwit commented Oct 11, 2018

Environment

  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
      CPU: x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
      Memory: 116.35 MB / 3.77 GB
      Shell: 4.4.19 - /bin/bash
    Binaries:
      Node: 8.12.0 - /usr/bin/node
      Yarn: 1.10.1 - /usr/bin/yarn
      npm: 6.4.1 - /usr/bin/npm
    SDKs:
      Android SDK:
        Build Tools: 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.3, 28.0.2, 28.0.3
        API Levels: 23, 25, 26, 27, 28
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.2 => 0.57.2 

Description

In React Native 0.56, the bundler will "Scanning folders for symlinks" in the project's node_modules directory. It doesn't do that anymore in React Native 0.57.

Reproduction procedure

  1. Clone peat-psuwit/react-native-symlink-scan-demo@9711207, cd linkingProject, and yarn install. At this commit, the version of React Native is 0.56.1.
  2. Run react-native start. Notice that in the very first line it said Scanning folders for symlinks in /path/to/linkingProject/node_modules (__ms).
  3. Go to http://localhost:8081/index.bundle?platform=android. Notice that it bundles successfully and there's a string "I'm linked!".
  4. Now checkout peat-psuwit/react-native-symlink-scan-demo@4298dcc peat-psuwit/react-native-symlink-scan-demo@8e5bb63. Run yarn install again. At this commit, the version of React Native is 0.57.2 0.60.4 and react-native-community/cli is at 2.8.3.
  5. Run react-native start. Notice that there isn't Scanning folders for symlinks ... anymore.
  6. Go to http://localhost:8081/index.bundle?platform=android. The bundling will fail with Unable to resolve module 'linked-package'.

Additional info

I believe this breaks in 9a77ff5. I'll prepare the PR that fixes this problem.

@react-native-bot react-native-bot added Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. Platform: Linux Building on Linux. labels Oct 11, 2018
peat-psuwit added a commit to peat-psuwit/react-native that referenced this issue Oct 11, 2018
Commit 9a77ff5 seems to disable symlink scanning for apps that doesn't
have a config file. This commit should restore that, without breaking
those with config files.

Fixes facebook#21735
peat-psuwit added a commit to peat-psuwit/react-native that referenced this issue Oct 11, 2018
Commit 9a77ff5 seems to disable symlink scanning for apps that don't
have a config file. This commit should restore that, without breaking
those with a config file.

Fixes facebook#21735
@gohopo
Copy link

gohopo commented Oct 26, 2018

I also got this problem
react-native: 0.55.4 => 0.57.3

@stale
Copy link

stale bot commented Aug 4, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added Stale There has been a lack of activity on this issue and it may be closed soon. and removed Stale There has been a lack of activity on this issue and it may be closed soon. labels Aug 4, 2019
@peat-psuwit
Copy link
Contributor Author

Confirmed that this issue still exists in React Native 0.60.4, with react-native-community/cli 2.8.3. I'll migrate both the issue and the proposed PR to the react-native-community/cli repo.

@peat-psuwit
Copy link
Contributor Author

Copied to react-native-community/cli#616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Platform: Linux Building on Linux. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants