-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Cross platform / architecture install option #5965
Comments
Yarn allows to use an array of supported architectures: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures Yarn's approach looks better to me. |
How does yarn's supportedArchitectures interact with packages which use a post-install script to download arch-specific binaries (such as |
☝️ That's my question too - I suspect that it only really works for os/arch-specific npms, but I haven't had a chance to try. I'd love it if |
The package manager don't have control over what happens in the postinstall script. All that these flags can do it (the Yarn one at least) is deciding which optional dependencies are fetched. If these flags are used by postinstall script then you just need to run this:
|
@zkochan if would implement the same supported architectures feature as a list like yarn has, where could I start looking inside pnpm? |
Start with the package-is-installable project. |
Any update regarding this issue ? Just got dumped here with same problem :) |
Just found this as a result of trying to get esbuild to work on both my mac dev machine and my docker dev container without having to reinstall everything. Being able to install things for both linux and darwin at once would be amazing. The esbuild error message specifically mentions Yarn's built-in support for installing a package on multiple |
Proposed fix to I hope we can consider passing: |
Just came across the same issue trying to run https://github.com/Brooooooklyn/snappy on lambda. I can't get the correct dependencies installed on Github Actions. Seems like the |
@spaceemotion E.g. does it as follows:
This seems to be a common set of variables as: https://yarnpkg.com/package?name=prebuild-install says:
I don't know snappy... nor napi but from quick look the |
@sfc-gh-ptabor Thanks for the clarifications! It actually ended up being that I had |
close #5965 --------- Co-authored-by: Zoltan Kochan <z@kochan.io>
There is still a serious problem with this: (Windows) I already have the windows-64 installed in Is there not global config we can set to install from because using Here is the full download. Could there be a better solution? Related to vercel/turborepo#2517 |
Describe the user story
npm install offers option to select a different platform/architecture. This is useful for example in case packages have a post-install script that fetches arch-specific binaries (such as sharp).
See https://sharp.pixelplumbing.com/install#cross-platform for an example.
Describe the solution you'd like
pnpm install --platform=linux --architecture=x64
Describe the drawbacks of your solution
I don't think there are any drawbacks. NPM has implemented this, but may have taken some shortcuts that I am not aware of and pnpm project isn't willing to take.
Describe alternatives you've considered
Spinning up a machine (or docker container) with that architecture and run pnpm install in that. But that's a rather heavyweight solution to this problem.
The text was updated successfully, but these errors were encountered: