Skip to content

use realpath of engine's route when building resolver.json - #1622

Merged
mansona merged 1 commit into
mainfrom
realpath-root
Oct 4, 2023
Merged

use realpath of engine's route when building resolver.json#1622
mansona merged 1 commit into
mainfrom
realpath-root

Conversation

@mansona

@mansona mansona commented Oct 4, 2023

Copy link
Copy Markdown
Member

This solves a problem that we face when we try to run embroider in an app where node_modules has been symlinked. The issue arises because all webpack requests normalise the path of a package using fs.realpath so when we're trying to find the owningEngine of a package we will always get the wrong answer because package passed into that request will have the real path on disk (after removing symbolic link information)

I have tested this locally and it also seems to unblock ember-cli/ember-cli#10370 because the ember-cli CI also does some shenanigans with linking node_modules

@mansona mansona added the bug Something isn't working label Oct 4, 2023
@mansona

mansona commented Oct 4, 2023

Copy link
Copy Markdown
Member Author

I've tested this against https://github.com/mansona/ember-inline-svg-bug-recreation and I've verified that it does indeed fix the issue that we're facing

@mansona
mansona merged commit f6078b1 into main Oct 4, 2023
@mansona
mansona deleted the realpath-root branch October 4, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants