要启用并行构建,请添加“/m”开关

问题描述 投票:0回答:1

我想运行此示例https://github.com/Gottox/node-webterm,但是当我执行命令 npm install 时,它显示错误消息。

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  exechelper.cpp
..\src\exechelper.cpp(3): fatal error C1083: Cannot open include file: 'unistd.
h': No such file or directory [V:\node-webterm-master\node_modules\child_pty\bu
ild\exechelper.vcxproj]
  pty.cpp
..\src\pty.cpp(25): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(25): error C2227: left of '->ws_row' must point to class/struct/
union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.vcx
proj]
..\src\pty.cpp(26): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(26): error C2227: left of '->ws_col' must point to class/struct/
union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.vcx
proj]
..\src\pty.cpp(27): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(27): error C2227: left of '->ws_xpixel' must point to class/stru
ct/union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.
vcxproj]
..\src\pty.cpp(27): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(27): error C2227: left of '->ws_ypixel' must point to class/stru
ct/union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.
vcxproj]
..\src\pty.cpp(31): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(31): error C2227: left of '->ws_col' must point to class/struct/
union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.vcx
proj]
..\src\pty.cpp(33): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(33): error C2227: left of '->ws_row' must point to class/struct/
union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.vcx
proj]
..\src\pty.cpp(39): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(39): error C2227: left of '->ws_row' must point to class/struct/
union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.vcx
proj]
..\src\pty.cpp(40): error C2027: use of undefined type 'winsize' [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
          ..\src\pty.cpp(22) : see declaration of 'winsize'
..\src\pty.cpp(40): error C2227: left of '->ws_col' must point to class/struct/
union/generic type [V:\node-webterm-master\node_modules\child_pty\build\pty.vcx
proj]
..\src\pty.cpp(44): error C2079: 'w' uses undefined struct 'winsize' [V:\node-w
ebterm-master\node_modules\child_pty\build\pty.vcxproj]
..\src\pty.cpp(46): error C2664: 'makews' : cannot convert parameter 1 from 'in
t *' to 'winsize *' [V:\node-webterm-master\node_modules\child_pty\build\pty.vc
xproj]
          Types pointed to are unrelated; conversion requires reinterpret_cast,
   C-style cast or function-style cast
..\src\pty.cpp(48): error C2065: 'TIOCSWINSZ' : undeclared identifier [V:\node-
webterm-master\node_modules\child_pty\build\pty.vcxproj]
..\src\pty.cpp(48): error C3861: 'ioctl': identifier not found [V:\node-webterm
-master\node_modules\child_pty\build\pty.vcxproj]
..\src\pty.cpp(50): error C2664: 'applyws' : cannot convert parameter 1 from 'i
nt *' to 'winsize *' [V:\node-webterm-master\node_modules\child_pty\build\pty.v
cxproj]
          Types pointed to are unrelated; conversion requires reinterpret_cast,
   C-style cast or function-style cast
..\src\pty.cpp(55): error C2079: 'w' uses undefined struct 'winsize' [V:\node-w
ebterm-master\node_modules\child_pty\build\pty.vcxproj]
..\src\pty.cpp(59): error C2664: 'makews' : cannot convert parameter 1 from 'in
t *' to 'winsize *' [V:\node-webterm-master\node_modules\child_pty\build\pty.vc
xproj]
          Types pointed to are unrelated; conversion requires reinterpret_cast,
   C-style cast or function-style cast
..\src\pty.cpp(60): error C3861: 'openpty': identifier not found [V:\node-webte
rm-master\node_modules\child_pty\build\pty.vcxproj]
..\src\pty.cpp(64): error C2664: 'applyws' : cannot convert parameter 1 from 'i
nt *' to 'winsize *' [V:\node-webterm-master\node_modules\child_pty\build\pty.v
cxproj]
          Types pointed to are unrelated; conversion requires reinterpret_cast,
   C-style cast or function-style cast
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (V:\NodeJS\node_modules\npm\node_modul
es\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "V:\\NodeJS\\node_modules\\npm\\node_modules\\node-gyp\\
bin\\node-gyp.js" "rebuild"
gyp ERR! cwd V:\node-webterm-master\node_modules\child_pty
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "V:\\NodeJS\\\\node.exe" "V:\\NodeJS\\node_modules\\npm\\bin\\npm-
cli.js" "install"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the child_pty package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls child_pty
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     V:\node-webterm-master\npm-debug.log
  1. 我已经安装了 python 2.7.3、windows 7 SDK,参考 https://github.com/TooTallNate/node-gyp#installation。但仍然遇到同样的错误。
javascript node.js npm pty terminal-emulator
1个回答
0
投票

我遇到了同样的问题,当我从 package.json 中删除一个依赖项时,我的问题得到了解决,该依赖项具有指向 github 页面而不是版本的链接。将该依赖项从“https://githubpage”切换为“0.0.0”。在寻找对 npm 的依赖之后

© www.soinside.com 2019 - 2024. All rights reserved.