安装石膏板身份验证

安装石膏板身份验证
C:\Users\zach\drywall>npm install

> [email protected] install C:\Users\zach\drywall\node_modules\bcrypt
> node-gyp rebuild

C:\Users\zach\drywall\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an
 invalid version number. [C:\Users\zach\drywall\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\zach\drywall\node_modules\bcrypt\build\bcrypt_lib.vcxproj]


gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\zach\drywall\node_modules\bcrypt
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.1.1
npm ERR! npm  v2.14.4
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 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! Please include the following file with any support request:
npm ERR!     C:\Users\zach\drywall\npm-debug.log

我正在尝试安装 Drywall,但出现需要 Visual Studio 2005 的错误,因此我重新安装了它,但仍然不起作用。所以我四处查看,发现许多人通过使用 Visual Studio 命令行解决了这个问题,所以我尝试了这种方法,但现在我得到了这个错误。我不知道这是什么意思。我想知道是否有人知道这是什么意思,或者如何解决它。此外,CL.exe 是什么?

谢谢。

答案1

一些MSDN 上有关 cl.exe 的详细信息

cl.exe 是一个控制 Microsoft C 和 C++ 编译器和链接器的工具。cl.exe 只能在支持 Microsoft Visual Studio 的操作系统上运行。

很可能它找不到 cl.exe,因为它不知道在哪个 SDK 目录中找到它。这与您收到的上一个错误有关。

无法从注册表中找到 WindowsSDKDir 变量。TargetFrameworkVersion 或 PlatformToolset 可能设置为无效的版本号。

WindowsSDKDir 变量定义了在哪里可以找到不同的编译工具(包括 cl.exe)。您没有安装 SDK,或者您的环境配置不正确。

在重建之前,请先尝试运行 setenv。(相关链接

call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86

或者

call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64

如果您仍然遇到问题,请在问题中提供更多信息,说明您安装了哪个 SDK 版本。

相关内容