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: resolving rimraf bin dir #3614

Merged
merged 4 commits into from Mar 24, 2023
Merged

fix: resolving rimraf bin dir #3614

merged 4 commits into from Mar 24, 2023

Conversation

tada5hi
Copy link
Contributor

@tada5hi tada5hi commented Mar 24, 2023

Description

Due to the fact that rimraf has changed its binary path, lerna no longer works with the new version 4.4.x. Therefore the cli location is now read from the package.json, as fallback the original module resolving was used.

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

fixes #3614

@nx-cloud
Copy link

nx-cloud bot commented Mar 24, 2023

Nx Cloud Report

CI is running for commit 1578725.

📂 Click to track the progress, see the status, the terminal output, and the build insights.


Sent with 💌 from NxCloud.

@JamesHenry
Copy link
Member

Thanks @tada5hi one small change then this LGTM!

@JamesHenry JamesHenry enabled auto-merge (squash) March 24, 2023 16:18
@JamesHenry JamesHenry merged commit 0fe5faf into lerna:main Mar 24, 2023
13 checks passed
@JamesHenry
Copy link
Member

Thanks again!

@JamesHenry
Copy link
Member

Sadly this didn't actually solve the problem because the bin path is not part of the package's exports and so node blocks it, I am looking into refactoring the whole approach here, I believe we can just use the node API of rimraf instead of all these child process + bin shenanigans

@tada5hi
Copy link
Contributor Author

tada5hi commented Mar 24, 2023

damm ... i think the problem is, that i missed to join the pck.bin path with the directory path of require.resolve. Could that be the problem ?

And it should be path.dirname instead of path.basename. I'm really sorry 😔

@tada5hi tada5hi mentioned this pull request Mar 24, 2023
10 tasks
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.

@lerna/legacy-package-management missing dependency on rimraf
2 participants