如何建立NPM使用一个64位系统上的32位二进制文​​件? [英] How do I build 32-bit binaries on a 64-bit system using npm?

查看:377
本文介绍了如何建立NPM使用一个64位系统上的32位二进制文​​件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发我打算使用节点的WebKit 分发,应用程序只对Windows 32位二进制文​​件。我的操作系统是Windows 7旗舰版64位,所以NPM正在建设 protobuf的节点,这是我使用。

I'm developing an application that I plan to distribute using node-webkit, which only has 32-bit binaries on Windows. My OS is Windows 7 Ultimate 64-bit, so npm is building 64-bit binaries of protobuf for node, which is a prerequisite of one of the modules I am using.

我曾尝试:


  • NPM安装protobuf的--arch = IA32

  • NPM安装protobuf的--target_arch = IA32

  • NPM集npm_config_arch IA32

  • 安装节点和故宫的32位版本,并使用它来安装的protobuf

和我不记得的时刻一些其他的东西。

And a few other things that I can't remember at the moment.

我怎样才能得到NPM来构建32位二进制文​​件?我将不得不建立它在32位机器上?

How can I get npm to build 32-bit binaries? Would I have to build it on a 32-bit machine?

推荐答案

您应该能够克隆回购成node_modules自己,它使用手动编译

You should be able to clone the repo into node_modules yourself and compile it manually using

node-gyp clean configure build --verbose --arch=ia32

在这里你克隆回购目录内。

inside the directory where you cloned the repo.

这篇关于如何建立NPM使用一个64位系统上的32位二进制文​​件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆