microsoft / node-uwp

Enables Universal Windows Platform (UWP) API access for Node.js (Chakra build) on Windows 10.
MIT License
152 stars 26 forks source link

Error installing uwp #32

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi there, I'm having some issues installing with npm. I'm using VS2017, Node v9.2.0, npm v5.6.0. If anyone can point me in the right direction, that would be awesome! Let me know if you need any more info. Thanks!

Here is the error I'm getting :


D:\Code\NativexR>npm install uwp

> uwp@1.0.2 install D:\Code\NativexR\node_modules\uwp
> node-gyp rebuild

D:\Code\NativexR\node_modules\uwp>if not defined npm_config_node_gyp (node "C:\Users\kyle\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\kyle\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  uwp.cc
  win_delay_load_hook.cc
..\src\uwp.cc(74): error C2065: 'JsErrorCode': undeclared identifier [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxpr
oj]
..\src\uwp.cc(74): error C2146: syntax error: missing ';' before identifier 'err' [D:\Code\NativexR\node_modules\uwp\bu
ild\uwp.vcxproj]
..\src\uwp.cc(74): error C2065: 'err': undeclared identifier [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxproj]
..\src\uwp.cc(75): error C2061: syntax error: identifier 'JsProjectionCallback' [D:\Code\NativexR\node_modules\uwp\buil
d\uwp.vcxproj]
..\src\uwp.cc(77): error C3481: 'jsCallback': lambda capture variable not found [D:\Code\NativexR\node_modules\uwp\buil
d\uwp.vcxproj]
..\src\uwp.cc(77): error C3481: 'jsContext': lambda capture variable not found [D:\Code\NativexR\node_modules\uwp\build
\uwp.vcxproj]
..\src\uwp.cc(77): error C3493: 'jsCallback' cannot be implicitly captured because no default capture mode has been spe
cified [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxproj]
..\src\uwp.cc(77): error C3493: 'jsContext' cannot be implicitly captured because no default capture mode has been spec
ified [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxproj]
..\src\uwp.cc(74): error C3861: 'JsSetProjectionEnqueueCallback': identifier not found [D:\Code\NativexR\node_modules\u
wp\build\uwp.vcxproj]
..\src\uwp.cc(82): error C2065: 'err': undeclared identifier [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxproj]
..\src\uwp.cc(82): error C2065: 'JsNoError': undeclared identifier [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxproj
]
..\src\uwp.cc(104): error C3861: 'JsProjectWinRTNamespace': identifier not found [D:\Code\NativexR\node_modules\uwp\bui
ld\uwp.vcxproj]
..\src\uwp.cc(104): error C2065: 'JsNoError': undeclared identifier [D:\Code\NativexR\node_modules\uwp\build\uwp.vcxpro
j]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\kyle\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:159:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kyle\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Code\NativexR\node_modules\uwp
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN react-native-windows@0.50.0-rc.2 requires a peer of react-native@~0.50.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! uwp@1.0.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uwp@1.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kyle\AppData\Roaming\npm-cache\_logs\2017-12-11T21_38_35_043Z-debug.log
aruneshchandra commented 6 years ago

This node-uwp package is only works with node-chakra. if you are trying to use UWP APIs using Node with V8, you should use NodeRT instead.