我尝试通过运行此命令 npm install --save ldap-client 在本地 Windows 机器上安装 nodejs 的 ldap-client 节点模块。
它给出了附加的错误
吉普错误!构建错误
gyp ERR!堆栈错误:C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
退出代码失败:1
gyp ERR!堆栈在 ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23) gyp
ERR!堆栈在 emitTwo (events.js:126:13) gyp
ERR!ChildProcess.emit (events.js:214:7) 的堆栈 gyp
ERR!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR!系统 Windows_NT 10.0.15063 gyp
错误!命令“C:\Program Files\nodejs\node.exe”“C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js”“重建”gyp
错误!cwd C:\workspace\AJNSDemoProject gyp
错误!节点 -v v8.10.0 gyp
错误!节点-gyp -v v3.6.2 gyp
错误!不好
npm 错误!代码 ELIFECYCLE
npm 错误!错误号 1
我从这里 ( http://www.openldap.org/software/download/ )将 OpenLDAP 客户端库安装为 tgz 并将其解压缩并将该文件夹放在我的项目根文件夹中。
我正在使用最新的节点版本 8.10.0
你能建议我的情况有什么问题吗?
谢谢
运行“node-gyp rebuild”命令时的调试日志
C:\workspace\AJNSDemoProject>node-gyp 重建
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@8.10.0 | win32 | x64
gyp info spawn C:\Program Files (x86)\Python\python.exe
gyp info spawn args [ 'C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'C:\\workspace\\AJNSDemoProject\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\niyaza.fazlullah\\.node-gyp\\8.10.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\niyaza.fazlullah\\.node-gyp\\8.10.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\Users\\niyaza.fazlullah\\.node-gyp\\8.10.0\\<(target_arch)\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\workspace\\AJNSDemoProject',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\workspace\\AJNSDemoProject\\build',
gyp info spawn args '-Goutput_dir=.' ]
Warning: Missing input files:
C:\workspace\AJNSDemoProject\build\..\src\binding.cc
gyp info spawn C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
binding.cc
c1xx : fatal error C1083: Cannot open source file: '..\src\binding.cc': No such file or directory [C:\workspace\AJNSDem
oProject\build\binding.vcxproj]
win_delay_load_hook.cc
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\niyaza.fazlullah\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\niyaza.fazlullah\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\workspace\AJNSDemoProject
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok