next-pkg
next-pkg copied to clipboard
State of the art
Hello folks,
i'm currently trying to deploy an nextjs application to a windows embedded pc. so l would like to have a complete bundled application. I've got an exe file out with pkg, but if i start it, it closes immediatly without any errors.
I've also tried it with next-pkg, but it wont work either. so is next-pkg still state of the art or is there a other working way?
Hi! I'm having the same problem, did you find any solutions or new ways to bundle a nextjs server to a single binary?
I last built it with this configuration
"bin": "server.js",
"pkg": {
"assets": [
"public/**/*",
".next/*",
".next/server/**/*",
".next/static/**/*"
],
"scripts": [
".next/server/**/*.js",
"require.js"
],
"targets": [
"node18-win-x64"
],
"outputPath": "pkg"
},