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

fix: Yarn doesn't want to Link Firebase #6536

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

askadityapandey
Copy link

@askadityapandey askadityapandey commented Oct 3, 2024

What's the problem this PR addresses?

This Pull Request addresses the issue where Yarn fails to link packages due to path length limitations on Windows. Specifically, it resolves the problem where certain subcomponents of Firebase do not get linked properly.

fixes #6512.

How did you fix it?

  1. Import constants from @yarnpkg/fslib:

    • This module provides constants like MAX_PATH, which is used to determine the maximum path length on Windows.
  2. Add Windows-specific path handling:

    • In the processWorkspace function, the code checks if the platform is Windows (process.platform === 'win32').
    • It then converts the portable path to a Windows path using npath.fromPortablePath.
    • If the path length exceeds constants.MAX_PATH, it attempts to shorten the path for virtual packages.
    • If the path is still too long, it uses the extended-length path syntax (\\?\) to handle long paths.
  3. Report linked packages:

    • The reportFooter function is added to the project.installWithNewReport call to provide a summary of the linked packages.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug?]: Yarn doesnt want to Link Firebase
1 participant