next-pkg icon indicating copy to clipboard operation
next-pkg copied to clipboard

State of the art

Open pustekuchen91 opened this issue 3 years ago • 2 comments

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?

pustekuchen91 avatar Dec 09 '22 13:12 pustekuchen91

Hi! I'm having the same problem, did you find any solutions or new ways to bundle a nextjs server to a single binary?

saogregl avatar Jan 14 '23 22:01 saogregl

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"
  },

pustekuchen91 avatar Apr 18 '23 10:04 pustekuchen91