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.
I have tried:
And a few other things that I can't remember at the moment.
How can I get npm to build 32-bit binaries? Would I have to build it on a 32-bit machine?
Path of Global Packages in the system: Global modules are installed in the standard system in root location in system directory /usr/local/lib/node_modules project directory. Command to print the location on your system where all the global modules are installed.
By "prebuilt", that means you won't have to build the C++ code yourself. It is pre-built (== built in advance) by the node-printer package. Follow this answer to receive notifications. answered Dec 27, 2019 at 5:56.
When executables are installed via npm packages, npm links to them: In local installs, they are linked to from a node_modules/. bin/ directory. In global installs, they are linked to from a global bin/ directory (e.g. /usr/local/bin ).
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With