How do I build 32-bit binaries on a 64-bit system using npm?

后端 未结 3 1226
我在风中等你
我在风中等你 2021-02-02 17:13

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-

3条回答
  •  终归单人心
    2021-02-02 17:47

    Add a file in your project root called .npmrc Windows explorer doesn't allow creation of a file name starting with a dot, but this can be done on windows command line like this:

    type NUL > .npmrc
    

    Then add the following line to the file:

    npm_config_arch=ia32
    

    You may also want to put this line in there to force VS build version, since some packages want to use non-installed versions. Replace 2013 with your version of Visual Studio if different (2012, etc):

    msvs_version=2013
    

提交回复
热议问题