You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/For Users/Advanced/Use Native Node Modules.md
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,19 @@ npm install
40
40
```
41
41
42
42
!!! warning "Note for Windows"
43
-
On Windows, `npm_config_node_gyp` have to be set to `path\to\global\node_modules\nw-gyp\bin\nw-gyp.js` instead of its batch script `nw-gyp.cmd`. This should be a [bug of npm](https://github.com/npm/npm/issues/14543).
43
+
You will need to have a compiler installed. You can get one by installing the [Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools). You will also need Python 2.7 (version 3.x is not supported).
44
+
The `npm_config_node_gyp` environment variable has to be set to `path\to\global\node_modules\nw-gyp\bin\nw-gyp.js` instead of the `nw-gyp.cmd` batch script. This is a [bug of npm](https://github.com/npm/npm/issues/14543).
45
+
You must use `set` instead of `export` to set environment variables in Windows. Here is a full example (Windows 10, Visual C++ Build Tool v2015):
46
+
47
+
```Batchfile
48
+
set PYTHON=C:\Python27\python.exe
49
+
set npm_config_target=0.21.6
50
+
set npm_config_arch=x64
51
+
set npm_config_runtime=node-webkit
52
+
set npm_config_build_from_source=true
53
+
set npm_config_node_gyp=C:\Users\xxxxxxxxx\AppData\Roaming\npm\node_modules\nw-gyp\bin\nw-gyp.js
0 commit comments