1

我正在为我的应用程序使用 Node.js,而且我对它很陌生。

我有一个从 LDAP 服务器获取用户凭据的案例,为此我在 NPM 注册表中找到了足够的模块。但是当我尝试输入“npm install”(在我的例子中是“npm install ldapauth”)时,它们都没有安装

早些时候它要求提供 Python 环境变量,我在此之后设置了该变量。

我为我的应用程序选择了“ldapauth”模块。当我尝试安装时,这是错误的堆栈跟踪:

{{{{

C:\Documents and Settings\mmalyala>npm install ldapauth
npm http GET https://registry.npmjs.org/ldapauth
npm http 304 https://registry.npmjs.org/ldapauth
npm http GET https://registry.npmjs.org/ldapjs/0.5.6
npm http GET https://registry.npmjs.org/lru-cache/2.0.4
npm http GET https://registry.npmjs.org/bcrypt/0.7.5
npm http 304 https://registry.npmjs.org/bcrypt/0.7.5
npm http 304 https://registry.npmjs.org/ldapjs/0.5.6
npm http 304 https://registry.npmjs.org/lru-cache/2.0.4
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.5 install C:\Documents and Settings\mmalyala\node_modules\ldapauth\
node_modules\bcrypt
> node-gyp rebuild


C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\bcrypt>nod
e "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules
\node-gyp\bin\node-gyp.js" rebuild
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/nopt/1.0.10
npm http GET https://registry.npmjs.org/bunyan/0.14.0
npm http GET https://registry.npmjs.org/dtrace-provider/0.2.1
npm http GET https://registry.npmjs.org/pooling/0.3.1
npm http GET https://registry.npmjs.org/buffertools/1.1.0
npm http 304 https://registry.npmjs.org/bunyan/0.14.0
npm http 304 https://registry.npmjs.org/nopt/1.0.10
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/dtrace-provider/0.2.1
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/pooling/0.3.1
npm http 304 https://registry.npmjs.org/buffertools/1.1.0
npm http GET https://registry.npmjs.org/abbrev

> buffertools@1.1.0 install C:\Documents and Settings\mmalyala\node_modules\ldap
auth\node_modules\ldapjs\node_modules\buffertools
> node-gyp rebuild


C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\nod
e_modules\buffertools>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gy
p-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http 304 https://registry.npmjs.org/abbrev

> dtrace-provider@0.2.1 install C:\Documents and Settings\mmalyala\node_modules\
ldapauth\node_modules\ldapjs\node_modules\dtrace-provider
> node-gyp rebuild


C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\nod
e_modules\dtrace-provider>node "C:\Program Files\nodejs\node_modules\npm\bin\nod
e-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http GET https://registry.npmjs.org/vasync/1.3.2
npm http 304 https://registry.npmjs.org/vasync/1.3.2
npm http GET https://registry.npmjs.org/verror/1.1.0
npm http 304 https://registry.npmjs.org/verror/1.1.0
npm http GET https://registry.npmjs.org/extsprintf/1.0.0
npm http 304 https://registry.npmjs.org/extsprintf/1.0.0
C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\bcrypt\bu
ild\binding.sln : error MSB3411: Could not load the Visual C++ component "VCBui
C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\nol
d.exe". If the component is not installed, either 1) install the Microsoft Win

dows SDK for Windows Server 2008 and .NET Framework 3.5, or 2) install Microsof
de_modules\dtrace-provider\build\binding.sln : error MSB3411: Could not load th
t Visual Studio 2008.
e Visual C++ component "VCBuild.exe". If the component is not installed, either
 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framewor
k 3.5, or 2) install Microsoft Visual Studio 2008.
C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\no
de_modules\buffertools\build\binding.sln : error MSB3411: Could not load the Vi
sual C++ component "VCBuild.exe". If the component is not installed, either 1)
install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.
5, or 2) install Microsoft Visual Studio 2008.
C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\no
de_modules\dtrace-provider\build\binding.sln : error MSB3411: Could not load th
e Visual C++ component "VCBuild.exe". If the component is not installed, either
 1) install the Microsoft Windows SDK for Windows Server 2008 and .NET Framewor
k 3.5, or 2) install Microsoft Visual Studio 2008.
gyp ERR! build error
gyp ERR! build error
gyp ERR! build error
gyp gyp gyp ERR! ERR! stack Error: `c:\WINDOWS\Microsoft.NET\Framework\v3.5\msbu
ild.exe` failed with exit code: 1
stackERR! stack Error: `c:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe` fai
led with exit code: 1
 Error: `c:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe` failed with exit c
ode: 1
gyp ERR!gypgyp  ERR!  stackERR!      at ChildProcess.onExit (C:\Program Files\no
dejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_
modules\node-gyp\lib\build.js:267:23)
stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_
modules\node-gyp\lib\build.js:267:23)
gyp ERR!gyp  stackERR! gyp ERR!      at ChildProcess.EventEmitter.emit (events.j
s:98:17)
stackgyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
stackgyp     at Process.ChildProcess._handle.onexit (child_process.js:784:12)
     at ChildProcess.EventEmitter.emit (events.js:98:17)
 gyp ERR! ERR!gypstack      at Process.ChildProcess._handle.onexit (child_proces
s.js:784:12)
 stack     at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR!gypERR!   System Windows_NT 5.1.2600
System Windows_NT 5.1.2600
ERR!gyp  gyp SystemERR! Windows_NT 5.1.2600
 ERR! commandcommandgyp "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\no
de_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
 "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\b
in\\node-gyp.js" "rebuild"
 gypgyp  ERR!ERR!  cwd C:\Documents and Settings\mmalyala\node_modules\ldapauth\
node_modules\bcrypt
cwd C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs
\node_modules\dtrace-provider
ERR!gyp gyp ERR!  commandnode -v "node" "C:\\Program Files\\nodejs\\node_modules
\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
ERR! v0.10.5
 gyp gyp node -v v0.10.5
gyp ERR! ERR! node-gyp -v v0.9.5
node-gyp -v v0.9.5
gyp gyp ERR!ERR! ERR! not ok
 not ok
cwd C:\Documents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs
\node_modules\buffertools
gyp ERR! node -v v0.10.5
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\m
malyala\node_modules\ldapauth\node_modules\ldapjs\docs'
npm ERR! error rolling back  ldapauth@2.2.2 { [Error: ENOTEMPTY, rmdir 'C:\Docum
ents and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\docs']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Documents and Settings\\mmalyala\\node_
modules\\ldapauth\\node_modules\\ldapjs\\docs' }
npm ERR! bcrypt@0.7.5 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the bcrypt@0.7.5 install script.
npm ERR! This is most likely a problem with the bcrypt 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 bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ldapauth"
npm ERR! cwd C:\Documents and Settings\mmalyala
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\m
malyala\node_modules\ldapauth\node_modules\ldapjs\node_modules\nopt'
npm ERR! error rolling back  ldapjs@0.5.6 { [Error: ENOTEMPTY, rmdir 'C:\Documen
ts and Settings\mmalyala\node_modules\ldapauth\node_modules\ldapjs\node_modules\
nopt']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: 'C:\\Documents and Settings\\mmalyala\\node_
modules\\ldapauth\\node_modules\\ldapjs\\node_modules\\nopt' }
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Documents and Settings\mmalyala\npm-debug.log
npm ERR! not ok code 0

}}}}}}

4

0 回答 0