fix(package): set process.env.npm_config_arch for each arch in universal build#3884
fix(package): set process.env.npm_config_arch for each arch in universal build#3884busterbogheart wants to merge 2 commits intoelectron:mainfrom
process.env.npm_config_arch for each arch in universal build#3884Conversation
process.env.npm_config_arch for each arch in universal build
erickzhao
left a comment
There was a problem hiding this comment.
Hey @busterbogheart,
Thanks for the PR on this and sorry for the lack of response on the original issue.
This seems reasonable to me, but I pushed up a new commit to be more intentional about setting this env var specifically for packaging universal apps: c012573
Can you let me know if this works for you?
MarshallOfSound
left a comment
There was a problem hiding this comment.
Hey @busterbogheart can you provide a sample basic electron app that has the problem you're describing that is fixed by the fix you're proposing.
Not entirely sure how this fixes things, and having that repro would potentially allow us to find a more safe solution.
|
its anoying to workaround all this shit, the patch here, is working semi good. Maybe for some of the packages, but there ist still more todo... use the package: @deepnest/svg-preprocessor it has optional packages each for different platforms and architectures. Same problem also for prebuilds from prebuildify like @deepnest/calculate-nfp both should be able to load for universal builds, but don't. And I'm currently not sure, what I can do, to let it build correctly. Currently I'm try this: https://github.com/Dexus/Deepnest/blob/9a1cd7bb1c1829037f5445a4c48e7bb333a8e6b5/forge.config.js#L61-L133 |
|
Same comment as above, gesturing wildly at random packages and saying "this doesn't work" is not helpful. The maintainers have limited bandwidth, if you want someone to look at a thing seriously, provide a repro case. A tiny repo (not a giant app) that demonstrates the problem you are reporting. If you do, it's much more likely people will be able to help you. |
|
Checkout this REPO: https://github.com/Dexus/Deepnest.git and then checkout to 9e2181aac5dc950d3d0fac4e836e3f81f17073e0 run and get your errors. |
Summarize your changes:
Closes #3657
This one line will set
process.env.npm_config_archto the appropriate architecture as the build creates multiple versions for the Mac universal app.