help
help copied to clipboard
The specified executable is not a valid application for this OS platform.At line:1 char:1
Details
I built a self-contained (not sure if this is the same as single executable app) by running following https://nodejs.org/api/single-executable-applications.html ~pkg . in the source code folder~ (in my macoS machine). And it gave me 3 executables for different OS.
I used the windows one in a windows machine and it shows this error:
PS C:\Users\User\Desktop\avocado> .\avocado.exe --version
Program 'avocado.exe' failed to run: The specified executable is not a valid application for this OS platform.At
line:1 char:1
+ .\avocado.exe --version
+ ~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ .\avocado.exe --version
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
Node.js version
21.3.0
Example code
https://github.com/Drjacky/Avocado
Operating system
macOS
Scope
runtime
Module and version
Not applicable.
Related
https://github.com/vercel/pkg/issues/2031 https://github.com/nodejs/single-executable/issues/85 https://github.com/vercel/pkg/issues/2037
Cc @nodejs/single-executable PTAL
Update:
The one that has been built by pkg . works but following https://nodejs.org/api/single-executable-applications.html, the built binary shows that error ☝🏼