【问题标题】:How do I compile a nodejs file using nexe on Windows?如何在 Windows 上使用 nexe 编译 nodejs 文件?
【发布时间】:2016-06-14 16:36:58
【问题描述】:

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

我正在尝试使用 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 上使用 nexe 编译 nodejs 文件?如果是这样,我鼓励您编辑标题
  • 是的,标题已更新。

标签: node.js windows visual-studio compilation


【解决方案1】:

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

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

【讨论】:

  • 好的,谢谢!我实际上只是决定最后使用 jxcore 进行编译。但如果我决定再次尝试 nexe,我一定会尝试您的解决方案。
【解决方案2】:

刚刚遇到同样的问题。对我来说,这是文件名中的一个空格。我看到你可能有同样的问题...'C:\Users\Kohdy Nicholson\Code.......'。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-20
    • 1970-01-01
    • 2020-11-20
    • 1970-01-01
    • 2013-07-07
    • 2011-07-24
    相关资源
    最近更新 更多