![]() More detailed guides for using native modules with NW.js are available on the official documentation site. Issues on Windows: npm_config_node_gyp must be set to path\to\global\node_modules\nw-gyp\bin\nw-gyp.js instead of its batch script nw-gyp.cmd. # Setup env for modules built with node-pre-gypĮxport npm_config_node_gyp=$(which nw-gyp) You won't need to rebuild each native modules one-by-one after npm install any more, which will significantly save your time on native modules.įollowing instructions work for all platforms and all releases (LTS and non-LTS) of NW.js: # Install nw-gyp globally If it can't find an existing nodemodules folder here, it then looks through the current directory's ancestors until it finds one. I'm here to introduce a way to install native modules for NW.js directly with npm. npm install installs packages either locally or globally: Locally: npm looks for an existing folder called nodemodules in the current directory and creates a folder for each package you install in that folder. Install native modules for NW.js with npm
0 Comments
Leave a Reply. |