Skip to content

question about pkg. #6124

@junjie-lean

Description

@junjie-lean

Question about Next.js

os -v:macOS Mojave 10.14.2
node -v: 10.14.2
pkg -v: 4.3.7
next -v:7.0.2
question description:
I use "PKG" to package my next app, and the packaged file can only be executed in the next app project path. If executed this file in another folder, an error will be reported "Could not find a valid build in the {process.cwd()} directory!" I guess my PKG configuration in package.json is wrong. It looks like this:

...
"pkg" : {
  "assets" :[
      ".next/**/*", 
       "static/**/*"
   ],
  "scripts" : ".next/server/**/*. Js"
}
...

How to package a next application with a complex directory structure?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions