node.js - 如何在Windows上使用nexe编译nodejs文件?

标签 node.js windows visual-studio compilation

所以我发现有很多人遇到了类似的问题。唯一的区别是,每个人似乎对此代码都有不同的修复。我正在尝试做的事情的简短摘要:

我正在尝试使用nexe编译nodejs文件。当我在我的linux机器上编译时,它工作得很好。但是我需要在 Windows 机器上编译它。当我尝试执行此操作时,它会在控制台中产生以下错误:

  FAILED: ..\..\Release\icupkg -tl ..\..\deps\icu-small\source\data\in\icudt57l.
dat C:\Users\Kohdy Nicholson\Code\Node\Eyereturn\tmp\nexe\nodejs\latest\node-v6.
2.1\Release\obj\global_intermediate\icutmp\icudt57l.dat
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targe
ts(171,5): error MSB6006: "cmd.exe" exited with code 1. [C:\Users\Kohdy Nicholso
n\Code\Node\Eyereturn\tmp\nexe\nodejs\latest\node-v6.2.1\tools\icu\icudata.vcxpr
oj]
  v8_nosnapshot.vcxproj -> ..\..\..\..\build\Release\lib\v8_nosnapshot.lib
  icui18n.vcxproj -> C:\Users\Kohdy Nicholson\Code\Node\Eyereturn\tmp\nexe\nodej
s\latest\node-v6.2.1\Release\lib\icui18n.lib
  icustubdata.vcxproj -> C:\Users\Kohdy Nicholson\Code\Node\Eyereturn\tmp\nexe\n
odejs\latest\node-v6.2.1\Release\lib\icustubdata.lib
  openssl-cli.vcxproj -> C:\Users\Kohdy Nicholson\Code\Node\Eyereturn\tmp\nexe\n
odejs\latest\node-v6.2.1\Release\\openssl-cli.exe
....> ERROR: The release executable has not been generated. This indicates a fai
lure in the build process. There is likely additional information above.

我的问题是,我怎样才能克服这个错误?我正在使用 Microsoft Visual Studio 15。我已经安装了与其关联的 Visual C++ 编译器。我已经安装了python 2.7。我还有最新版本的 Node 6.2 和 npm 3.9。我也在使用最新版本的 ICU 57。我很茫然。

最佳答案

我遇到了类似的问题(在 Windows 和 Cygwin 上),这是由 260 character limitation on Windows path names 引起的.

为了解决这个问题,我将项目移动到我的用户目录中 - 这充分缩短了中间路径,以允许 nexe 运行完成。

关于node.js - 如何在Windows上使用nexe编译nodejs文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37817653/

相关文章:

asp.net - 如何更新 asp.net azure 应用程序

visual-studio - Visual Studio Express - 简单构建配置错误

node.js - 勒纳致命 : ambiguous argument 'origin/heads/origin/master...heads/origin/master' : unknown revision or path not in the working tree

node.js - 为什么 Mongoose 预 Hook 不适用于 fat-arrow 函数语法

.net - 如何配置 OpenFileDialog 来选择文件夹?

windows - 如何使用批处理脚本对目录中的每个文件执行某些操作

javascript - Gmail API-gapi 未定义node.js

javascript - 在 Mocha 中使用 Sinon 读取断言控制台消息

Javascript:检查重复打开的窗口

c++ - OpenCV 断言错误 mat.hpp 第 570 行