You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was trying to use nexe to build an executable file for windows x64 with the newest NestJS on my system Zorin OS 17.1 Pro. My Application is just the Hello World example when using @nx/nest to initialize a simple NestJS App. The releases were missing node 20.11.1 so I went with the build flag: npx nexe ./dist/apps/main.js -t windows-x64-20.11.1 -o test-server.exe --python=$(which python3) --build
Build process went through without any errors. However once I have moved the exe to my target Windows System (Microsoft Windows Server 2022 Datacenter) it crashed with the following message:
// Translated from Image
16-bit application not supported
The Program or the feature "\??\C:\Program\Files\...\x-server.exe"
cannot be started or executed due to incompatibility with 64-bit versions of Windows.
Contact the software manufacturer to find out whether a version compatible with 64-bit Windows is available.
What you expected to happen:
The Endproduct should be 64x since I have used the right target: -t windows-x64-20.11.1.
How to reproduce it (as minimally and precisely as possible):
Create a Monorepo with the latest NX Version and NestJS: npx create-nx-workspace my-workspace --preset=nest leave everything as is with the hello world example and install the latest nexe. After that use the command: npx nexe ./dist/apps/main.js -t windows-x64-20.11.1 -o test-server.exe --python=$(which python3) --build . Make sure you have Node 20.11.1 installed.
Anything else we need to know?:
Here are the target machine specs:
Environment:
Platform(OS/Version): Zorin OS 17.1 Pro
Host Node Version: 20.11.1
Target Node Version: 20.11.1
Nexe version: 4.0.0-rc.4
Python Version: 3.10.12
The text was updated successfully, but these errors were encountered:
I encountered something similar recently. From what I understand now, it seems like the --build flag will effectively override the target arch.
I have a locally-compiled version of 20.11.1 for Linux on my machine. When I specify --build with the Windows target, which doesn't have a prebuilt binary, I get a normal Linux executable file, see below:
) ✗ pnpm nexe -t windows-x64-20.11.1 --build --name test-binary --verbose
ℹ nexe 5.0.0-beta.1
✔ Resolving dependencies...
✔ Downloading Node.js source from: https://nodejs.org/dist/v20.11.1/node-v20.11.1.tar.gz
✔ Already downloaded...
✔ Compiling result
✔ Writing result to file
✔ Entry: 'src/index.ts' written to: test-binary.exe
✔ Finished in 0.143s
➜ server git:(main) ✗ file test-binary
test-binary: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d463c17d1f6f4a4096f336ba42aa6395ee1d3f1d, for GNU/Linux 3.2.0, with debug_info, not stripped
➜ server git:(main) ✗
What happened:
Hi, I was trying to use nexe to build an executable file for windows x64 with the newest NestJS on my system Zorin OS 17.1 Pro. My Application is just the
Hello World
example when using@nx/nest
to initialize a simple NestJS App. The releases were missing node 20.11.1 so I went with the build flag:npx nexe ./dist/apps/main.js -t windows-x64-20.11.1 -o test-server.exe --python=$(which python3) --build
Build process went through without any errors. However once I have moved the exe to my target Windows System (Microsoft Windows Server 2022 Datacenter) it crashed with the following message:
What you expected to happen:
The Endproduct should be 64x since I have used the right target:
-t windows-x64-20.11.1
.How to reproduce it (as minimally and precisely as possible):
Create a Monorepo with the latest NX Version and NestJS:
npx create-nx-workspace my-workspace --preset=nest
leave everything as is with the hello world example and install the latest nexe. After that use the command:npx nexe ./dist/apps/main.js -t windows-x64-20.11.1 -o test-server.exe --python=$(which python3) --build
. Make sure you have Node 20.11.1 installed.Anything else we need to know?:
Here are the target machine specs:
Environment:
The text was updated successfully, but these errors were encountered: