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: esbuildOutputFromId for symlinked root (fix #9327) #17971

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

htmlin
Copy link

@htmlin htmlin commented Aug 29, 2024

Description

Positioning information on #9327 :

  1. Since my project uses pnpm, there are a lot of symlinked dependencies.
  2. This issue is intermittent but occurs very frequently, and it often stems from react dependency. It's in peerDeps.
  3. I'm using a workspace, and the issue seems to arise because the packages/user directory is missing in cwd during output parsing.
for (const [key, value] of Object.entries(outputs)) {
  if (normalizePath$3(path$n.relative(cwd, key)) === normalizedOutputPath) {
    return value;
  } else {
    console.log('cwd: ', cwd) // /Users/linhuangdong/Git/projectRoot
    console.log('key: ', key) // ../user/node_modules/.vite/deps_temp_ee3bd11b/react.js
    console.log('normalizedOutputPath: ', normalizedOutputPath) // packages/user/node_modules/.vite/deps_temp_ee3bd11b/react.js
  }
}

Copy link

stackblitz bot commented Aug 29, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

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.

1 participant