What happened:
As soon as I want to build my application, an error occurs, and i don't no why :
ℹ nexe 3.3.2
- nexe 3.3.2[16:46:47] Finished 'build' after 34 ms
✔ Included 146 file(s). 2.366 MB
✔ Already downloaded...
✔ Compiling Node with arguments: nosign,release,x64
✔ Finished in 52.455s
(node:38596) UnhandledPromiseRejectionWarning: Error: vcbuild.bat nosign release x64 exited with code: 1
at new NexeError (C:\Users\Fellgill\Desktop\groove-music-discord-rpc\node_modules\.pnpm\[email protected]\node_modules\nexe\lib\compiler.js:83:28)
at ChildProcess.<anonymous> (C:\Users\Fellgill\Desktop\groove-music-discord-rpc\node_modules\.pnpm\[email protected]\node_modules\nexe\lib\compiler.js:274:28)
at Object.onceWrapper (events.js:313:26)
at ChildProcess.emit (events.js:223:5)
at ChildProcess.EventEmitter.emit (domain.js:498:23)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:38596) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with
.catch(). (rejection id: 2)
(node:38596) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
What you expected to happen:
Build the application, with custom node.rc configuration
How to reproduce it (as minimally and precisely as possible):
Create a file, and enter this code (for me is this) :
const { src, dest } = require('gulp');
const coffee = require('gulp-coffee');
const obfuscator = require('gulp-javascript-obfuscator');
const sourcemaps = require('gulp-sourcemaps');
const prettier = require('gulp-prettier');
const nexe = require('nexe');
// Just compile the CoffeeScript code
function compile(callback) {
src('./src/*.coffee', { sourcemaps: true })
// Compile the CoffeeScript code
.pipe(coffee())
// Obfuscate the compiled code
.pipe(obfuscator())
// Beautify the code
.pipe(prettier({ singleQuote: true }))
// Write sourcemaps
.pipe(sourcemaps.write('./'))
// Write all in dist folder
.pipe(dest('./dist'));
// Callback
callback();
}
// Build a exe app
async function build(callback) {
// Run compile task
// Todo: Wait until this task is finished to build the executable,
// so for the moment, use gulp compile first then gulp build
/*
await compile(function() {
console.log('\n');
});
*/
// When compile task is finished, run nexe build
nexe.compile({
// Input bundle file path
input: './index.js',
// Output executable file path
output: './dist/build/groove-rpc',
// An object or string describing platform-arch-version
target: 'windows',
// Array of globs with files to include in the build
resources: [
'./node_modules/**/*'
],
// https://github.com/nexe/nexe/issues/780
build: true,
// Settings for patching the node.rc configuration file
rc: {
CompanyName: "FellGill",
ProductName: "Groove Music RPC",
FileDescription: "A NodeJS integration of Groove Music for Discord",
FileVersion: "0,0,1",
ProductVersion: "0,0,1",
OriginalFilename: "groove-rpc.exe",
InternalName: "groove-rpc",
LegalCopyright: "Copyright FellGill. Apache 2.0 license."
}
});
// Callback
callback();
}
exports.default = compile
exports.compile = compile
exports.build = build
Anything else we need to know?:
Issue following ''rc: object' don't change anythings'. Build worked very well before I added 'build: true'
Environment:
compile returns a promise, so you'll want to do
compile(...).then(() => callback(), callback)
You can check the error vcbuild.bat is throwing by using verbose:true option
So i added is my code this :
verbose: true
}).then(() => callback(), callback)
And i have this error :
Note: vcbuild no longer signs by default. "nosign" is redundant.
Looking for Python
Python 2 found in C:\Python27\\python.exe
Looking for NASM
Could not find NASM, install it or build with openssl-no-asm. See BUILDING.md.
✔ Compiling Node with arguments: nosign,release,x64
✔ Finished in 50.399s
I have to download 'openssl-no-asm' suddenly?
Oh ok i see, i downloaded NASM and at the moment it seems to be working. I have some warning here and there but it seems to me to work!
I close this issue. To solve the problem I had, just install NASM (latest build)