-
Notifications
You must be signed in to change notification settings - Fork 62
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
Handle symlinks #84
Comments
This actually means if you use any tool that makes sym links to node_modules won't work. Just encountered this again when trying to use yarn's |
the issueI also encountered this when switching https://github.com/NicBOMB/Vortex to pnpm and using workspace linking (which is incredibly useful). I was looking at implementing a fix and encountered some issues with the queue's structure in the nodeModuleCollector (invoked by the current algorithmThe structure of the queue assumes all dependencies may fallback to the main project's Specifically related to #20 the provided algorithm uses a subtractive step:
rather than an additive one (see the NODE_MODULES_PATHS pseudo-code from the node docs on CJS resolution). This discrepancy alone might not be a problem. However, when using a dedicated 2 package.json setup (split dev and app package manifests), the queue algorithm will eventually step backwards into the main project's node_modules and specifying the app directory (as is done by electron-builder and seen in #20 ) does not prevent this, which is particularly unwanted.
New package managers which support comprehensive dependency linking are specifically more appealing for this setup because they can dramatically reduce duplicate packages and installation times. Using a subtractive path construction step in the dependency tree resolver does trivially avoid dependency cycles but is causing the desired package paths to be missed and is notably incompatible with evaluating symlinked packages. my feedbackThe resolver needs to more strictly adhere to the CJS/ESM resolution algorithm(s) AND evaluate symlinks. I saw @mmaietta recommending creating an issue here with details, but I think a PR to @develar is there a particular reason for keeping this |
I created a PR to try to solve the problem of electron-builder and symlinks. This fix aims to support the node_modules structure of pnpm, and should also be able to handle the monorepo situation. Can someone review it for me? The basic idea is to find the real path of the symlinks, and then recursively find node_modules/[pkg] |
Hi @rxliuli , I don't manage this project and also don't know Golang to be able to help out here. |
It would be awesome to work with symlinks properly. PNPM provides many advantages over NPM & Yarn and popular enough to support it! |
* feat: Handle symlinks, support pnpm and monorepo, ref: #84 * chore: suggested changes
it's merged, now we need new release of this package right? |
Even though #89 has been merged, there are still some tasks that need to be completed:
|
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Go away stale bot, you're not welcome here |
Deleted the stale bot from the repo 😅 |
@naderhen deploying release v25.1.6 now. Please update when you have a chance |
Currently this package doesn't handle sym links very well and as a result is incompatible with pnpm.
electron-userland/electron-builder#6792 (comment)
For pnpm support it would be great if symlinks in node_modules were parsed as well
The text was updated successfully, but these errors were encountered: