-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Vite][Yarn Workspace] Failed to resolve entry for package "xyz" #20520
Comments
I’ve just got into this problem too and found out that the problem is because the library has a symbolic link in node_modules, I think it’s created automatically when the library is created. Remove the symbolic and problem is solved. |
The hacky fix for me was setting At the end, I decided to migrate the whole project to Turborepo instead. |
Hi @bobalazek I found a different solution in case you're interested: basically instead of removing the symbolic link, you need to change the import alias name on "paths" property inside I explain this solution in more detail in this recent issue: #21030 Please let me know in the comments in case you try this and works (I'm curios if this happens also using yarn, it seems to be the case). |
This might help, as it's most probably related to symlinks as @hailerity mentioned #18931 (comment) |
…#27155) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> In Yarn and PNPM Workspaces, the `nxViteTsPaths`'s `resolveId` is not called because Vite has already tried to resolve the module. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Ensure the `nxViteTsPath`'s logic is run before vite's internal resolver. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #20520 (cherry picked from commit 795f847)
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I am unable to build react libraries if they are dependent on another library.
I spent the whole afternoon yesterday trying to fix this, but I couldn't really get to the bottom of this. Clearly, I've tried to set those "main" and "exports" to
./src/index.js
, but this didn't work either, which kind of makes sense, because theweb-ui
library does build and in thedist
folder theindex.js
is actually in the same directory as package.json, so I couldn't wrap my head around why that is an issue.Expected Behavior
Should build as expected
GitHub Repo
https://github.com/bobalazek/nx-issue-repro
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
Yarn v4.0.2
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: