简体   繁体   English

如何在Windows上使用nexe编译nodejs文件?

[英]How do I compile a nodejs file using nexe on Windows?

So I see there is quite a few people who have gotten a similar issue. 因此,我看到很多人遇到了类似的问题。 The only difference being, everyone seems to have a different fix for this code. 唯一的区别是,对于此代码,每个人似乎都有不同的解决方案。 Short summary of what I'm trying to do: 我正在尝试做的简短摘要:

I'm trying to compile a nodejs file using nexe. 我正在尝试使用nexe编译一个nodejs文件。 When I compile on my linux machine, it works fine. 当我在Linux机器上编译时,它可以正常工作。 However I need to compile it on a windows machine. 但是我需要在Windows机器上编译它。 When I try to do this, it produces this error in the console: 当我尝试执行此操作时,它将在控制台中产生以下错误:

  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.

My question is, how can I possibly overcome this error? 我的问题是,我怎样才能克服这个错误? I'm using Microsoft Visual Studio 15. I've installed the Visual C++ compiler associated with it. 我使用的是Microsoft Visual Studio15。已经安装了与其相关的Visual C ++编译器。 I've installed python 2.7. 我已经安装了python 2.7。 I also have the most recent version of node 6.2 and npm 3.9. 我还拥有节点6.2和npm 3.9的最新版本。 I am using the latest version of ICU 57 as well. 我也在使用最新版本的ICU 57。 I'm at a loss. 我很茫然。

I've run into a similar problem (on both Windows and Cygwin) which is caused by the 260 character limitation on Windows path names . 我遇到了类似的问题(在Windows和Cygwin上),这是由Windows路径名260个字符限制引起的。

To work around this, I moved the project into my User directory - this shortened the intermediate paths sufficiently to allow nexe to run to completion. 要解决此问题,我将项目移到了User目录中-这缩短了中间路径,足以使nexe运行完成。

Just had the same issue. 只是有同样的问题。 for me it was a space in the filename. 对我来说,文件名中有一个空格。 I see you could have the same issue ... 'C:\\Users\\Kohdy Nicholson\\Code.......'. 我看到您可能遇到相同的问题...'C:\\ Users \\ Kohdy Nicholson \\ Code .......'。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM