Skip to content

Conversation

@ljharb
Copy link
Contributor

@ljharb ljharb commented Nov 26, 2023

This avoids a Cannot read properties of null (reading 'realpath') error when installing a tree that contains, eg, https://npmjs.com/has-package-exports which has a file dep in it.

May relate to other issues with similar errors; I'm happy to add a test but I'm not sure how to repro it outside of my project.

(I'll want to backport this as far back as possible once it lands in 10, so a test would be quite helpful to have)

@ljharb ljharb requested a review from a team as a code owner November 26, 2023 22:18
@wraithgar
Copy link
Member

Unfortunately the test is The Thing for this bug. Many PRs have been started but none provides a test that shows the root cause. Without that we're just fixing it by accident. We have to know why this happens to know if this fix is the right one.

@lukekarrys lukekarrys merged commit ae2d982 into npm:latest Dec 6, 2023
@ljharb ljharb deleted the null-target branch December 6, 2023 19:30
@ljharb
Copy link
Contributor Author

ljharb commented Dec 6, 2023

<3 thank you!

@github-actions github-actions bot mentioned this pull request Dec 6, 2023
ljharb added a commit to ljharb/cli that referenced this pull request Dec 6, 2023
@ljharb ljharb added ws:arborist Related to the arborist workspace Release 10.x labels Dec 6, 2023
@ljharb
Copy link
Contributor Author

ljharb commented Dec 6, 2023

Created #7059 for v9.

ljharb added a commit to ljharb/cli that referenced this pull request Dec 8, 2023
ljharb added a commit to ljharb/cli that referenced this pull request Dec 16, 2023
ljharb added a commit to ljharb/cli that referenced this pull request Jan 16, 2024
ljharb added a commit to ljharb/cli that referenced this pull request Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release 10.x ws:arborist Related to the arborist workspace

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants