cannot built when npm i freerdp
zhoutianwu opened this issue · 4 comments
C:\Users\Administrator\Hozz5>cnpm i freerdp
[freerdp@*] installed at node_modules.freerdp@0.2.9 (1 packages, use 791ms, speed 62.14kB/s, json 49.53kB, tarball 0B)
execute post install scripts...
[freerdp@0.2.9] scripts.install: "node-gyp rebuild" at .\node_modules.freerdp@0.2.9
C:\Users\Administrator\Hozz5\node_modules.freerdp@0.2.9>node "C:\Users\Administrator\AppData\Roaming\npm\node_modules\c
npm\node_modules\npminstall\node-gyp-bin\node-gyp.js" rebuild
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
context.cc
generator.cc
rdp.cc
c:\users\administrator\hozz5\node_modules.freerdp@0.2.9\context.h(4): fatal error C1083: Cannot open include file: 'fr
eerdp/freerdp.h': No such file or directory (compiling source file ..\context.cc) [C:\Users\Administrator\Hozz5\node_mo
dules.freerdp@0.2.9\build\node-freerdp.vcxproj]
bridge.cc
cliprdr.cc
..\cliprdr.cc(3): fatal error C1083: Cannot open include file: 'winpr/crt.h': No such file or directory [C:\Users\Admin
istrator\Hozz5\node_modules.freerdp@0.2.9\build\node-freerdp.vcxproj]
node-freerdp.cc
c:\users\administrator\hozz5\node_modules.freerdp@0.2.9\rdp.h(5): fatal error C1083: Cannot open include file: 'freerd
p/freerdp.h': No such file or directory (compiling source file ..\rdp.cc) [C:\Users\Administrator\Hozz5\node_modules.f
reerdp@0.2.9\build\node-freerdp.vcxproj]
win_delay_load_hook.cc
c:\users\administrator\hozz5\node_modules.freerdp@0.2.9\rdp.h(5): fatal error C1083: Cannot open include file: 'freerd
p/freerdp.h': No such file or directory (compiling source file ..\bridge.cc) [C:\Users\Administrator\Hozz5\node_modules
.freerdp@0.2.9\build\node-freerdp.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\nod
e-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\AppData\Roaming\npm\node_modules\c
npm\node_modules\npminstall\node-gyp-bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\Hozz5\node_modules.freerdp@0.2.9
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Error: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
Error: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\in
dex.js:67:21)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
As of right now, Windows is completely untested. It's entirely possible we can get it to work, I just haven't tried yet. This error in particular looks like the installer was unable to locate the development headers for freerdp which must be present on any system for the build to work.
Same error on CentOS 7. I have installed freerdp and freerdp-devel.
@vivshankar This type of error suggests the build couldn't find the header files it needed rather than a build error itself. Are you sure you have header libs installed and in the path for freerdp 1.1.x specifically?
I did install freerdp-devel, which carries the headers. Could be because it's the wrong version. Will check and get back to you. Thanks.