简体   繁体   English

我对 npm package nexe 和 Visual Studio 有问题,试图在 an.exe 中转换 nodejs 应用程序

[英]I have a problem with npm package nexe and visual studio, trying to convert a nodejs app in an .exe

nexe is a npm package to convert nodejs apps to an.exe, but I have a problem when I run nexe是一个 npm package 将nodejs应用程序转换为an.exe,但是我运行时遇到问题

nexe --build index.js

so I add --verbose and this is the message:所以我添加了--verbose ,这是消息:

终端

the message said: failed to find a suitable Visual studio installation and also vcbuild.bat nosign release x64 exited with code: 1消息说:找不到合适的 Visual Studio 安装,并且vcbuild.bat nosign release x64 exited with code: 1

My question is:我的问题是:

is it mandatory to have visual studio installed?是否必须安装视觉工作室? I read that "desktop development with c++" is necessary to make the.exe in windows.我读到“使用 C++ 进行桌面开发”是在 windows 中制作.exe 所必需的。 BUT:但:

视觉工作室

I make this question because my internet connection is so bad, and the visual studio installation will take me 4 or 5 days, because it's a little bit more of 7gb.我提出这个问题是因为我的互联网连接太差了,而 Visual Studio 的安装需要我 4 或 5 天,因为它有点多 7gb。 Is there a lighter alternative that has the necessary packages?是否有具有必要包装的更轻的替代品?

NOTE: I make this question here in stackoverflow because I open a issue in the nexe github repo and nobody answered me.注意:我在 stackoverflow 中提出这个问题是因为我在 nexe github repo 中打开了一个问题,但没有人回答我。 So i hope someone tried that package and if they got the same error tell me what they did to fix it所以我希望有人尝试过 package 如果他们遇到同样的错误,请告诉我他们做了什么来解决它

NOTE 2: I also tried pkg for vercel, but also have problems making an.exe注意 2:我也尝试过pkg for vercel,但在制作 an.exe 时也有问题

As described here ( gitanswer.com ) this is indeed necessary for making nexe finally work.如此处所述( gitanswer.com ),这确实是使 nexe 最终工作所必需的。 In my case it was the solution.就我而言,这是解决方案。 I installed VS 2022 and added the marked workload additionally.我安装了 VS 2022 并额外添加了标记的工作负载。

I ran nexe-4.0.0-beta-19 on Windows.我在 Windows 上运行了 nexe-4.0.0-beta-19。

First I had to install NSAM from here ( nasm.us ) and Python (3.10 using chocolatey in my case).首先,我必须从这里( nasm.us )和 Python (在我的情况下使用巧克力的 3.10)安装 NSAM。

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

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