当前位置: 首页 > 面试题库 >

无法使用npm安装prerender-“无法找到:CL.exe”

逄皓轩
2023-03-14
问题内容

我一直在尝试PreRender.Io在本地计算机上安装进行测试。我已经安装了Python 2.7.10。当我键入:

npm install prerender

它给出一个错误:

C:\PreRender\node_modules\prerender\node_modules\phantom\node_modules\dnode\node
_modules\weak>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.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the
 file specified. [C:\PreRender\node_modules\prerender\node_modules\phantom\node
_modules\dnode\node_modules\weak\build\weakref.vcxproj]


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 (C:\Program Files\nodejs\node_modules\
npm\node_modules\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.1.7601

我找不到CL.exe,在Google上进行的快速搜索似乎缺少了一些Visual C 编译器。但是,我尝试安装说VC
2008可再发行的x86,但仍然是同样的问题。

知道有什么问题吗?操作系统是Windows 7 64位。


问题答案:

我设法解决了这个问题,尽管这很奇怪。老实说,我不确定是哪一个完全解决了问题,因为我做了很多工作。我已经在计算机上安装了Visual Studio
2015。以下是我所做的摘要:

  • 安装 Visual C ++编译 ,从VS 2015安装。默认情况下,它是未选中的。我认为这就是解决此问题的原因。

  • CL.exe (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin)stdlib.h 所在的路径添加(C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include)PATH 环境变量中。

  • npm install prerenderDeveloper Command Prompt* Visual Studio 2015 的in中执行,以 管理员模式 运行 *



 类似资料:
  • 问题内容: 尝试安装NPM时收到此错误。非常感谢对此错误的任何帮助。 从http:// …-> https://更改了命令,仍然没有运气。 其他资讯: 作业系统:Mac OSX 10.8.2 CURL:curl 7.24.0(x86_64-apple-darwin12.0) 因此,我尝试以超级用户身份进行安装,并很快遇到了这堆文字。 我在这里完全迷路了。 问题答案: 您将获得install.sh脚

  • 任何帮助都将得到高度赞赏。 谢谢,沙兹

  • 我已经完全卸载了我的Windows机器节点,删除了所有相关的节点和npm文件夹。 我重新安装了 节点(v0.12.7) npm(3.0.0) python(2.7.10) 当我安装emem-cli,我得到: PS C:\WINDOWS\system 32 C:\Program Files\nodejs\ember- bufferutil@1.1.0安装C:\Program Files\nodejs

  • 我试图安装npm包(node-xmpp-server),但它未能安装。以前,当我试图安装一个包,是安装全局而不是本地,但现在它根本没有安装。 npm安装节点xmpp服务器 错误为:npm ERR!errno-4048 npm错误!Windows NT 6.3。9600 npm错误!argv“c:\Program Files\nodejs\node.exe”“c:\Program Files\nod

  • =D:\Users\pjha\AppData\Roaming\npm\node\u modules\tty。js\node\u模块\ws (节点gyp重建2

  • 问题内容: 我正在尝试使用安装模块。但是它总是会出错。这是错误: 我一直在搜索它,通常说它是关于。我的节点是v10.16.0。我还安装了Python 2.7。我的vs版本是2019。 确实,这仅与模块有关。如果是这样,是否还有其他解决方案可在Node.js中预览png等文件 编辑 我已卸载VS2019并安装了VS2017 Build Tools。但是仍然给出另一个错误: 问题答案: 我过去也遇到过