This command line interface enables you to package your Node.js project into an executable that can be run even on devices without Node.js installed.
Questions tagged [zeit-pkg]
38 questions
7
votes
3 answers
How to package sqlite3 in node.js executable packages?
I want to make use of a simple database in a compiled node.js app. Is this possible without installing the database separately? i.e I want the database to be included in the .exe file so that I can just copy and execute that file.
I'm using pkg to…

Zach Smith
- 8,458
- 13
- 59
- 133
5
votes
1 answer
Error: Nodejs keytar.node is not a valid Win32 application
I packaged my cli application using pkg and it is working fine on macOS but not running on windows and complaining about keytar.node binary. I am using the same keytar.node which i installed on development machine(macOS) to run on windows as well. I…

Nadeem Baig
- 71
- 3
5
votes
0 answers
Package Node-Red using zeit/pkg
I am having some issues using zeit/pkg on my node-red project. Here are the steps to replicate the issue:
git clone https://github.com/node-red/node-red.git
cd node-red
npm install
npm run build
After build command I added the following to my…

626
- 1,159
- 2
- 16
- 27
5
votes
1 answer
Meteor-Now Deployment Error "sh: meteor: not found"
I have problems deploying my meteor app with meteor-now. I followed this tutorial here. I also tried deploying with ZEIT's OSX Client but it always throws the same error. Does anyone know a workaround?
Edit 1:
This is my package.json
{
…

rlated
- 53
- 3
4
votes
1 answer
Next.js. Required files for docker image
I am creating a Next.js project using Docker, but every time I run docker build, the docker image is 300 MB+. My goal is to reduce the size of the docker image. For this I started using zeit/pkg but it doesn't work properly.
Question:
What files are…

Arthur
- 3,056
- 7
- 31
- 61
4
votes
0 answers
Pkg snapshot folder
The Pkg CLI packages node.js applications into executables.
At runtime, the application should access assets from the global /snapshots/ folder (or C:\snapshots\ on Windows).
Does this mean only one Pkg app can run at the same time, due to sharing…

David Callanan
- 5,601
- 7
- 63
- 105
4
votes
1 answer
How does zeit/pkg bundle my node application?
This is my first question on SO so first of all a BIG HELLO and please excuse in case my question doesn't fit all critereas or seems akward.
I would like to know how my app is bundled and compiled with zeit's pkg.
Is the bundle inserted into the…

Orchid
- 63
- 1
- 4
4
votes
0 answers
Debug an running exe app that packed by zeit/pkg
Can I attach a debugger to a running NodeJS application that packed by pkg?
My new company has a packed console app without source code. It's worked fine in last year, but it has some small exception in this year.
It seems some exceptions happened…

NSK
- 306
- 1
- 4
- 8
3
votes
1 answer
package node with pkg ERR_INSPECTOR_NOT_AVAILABLE at run time
I am playing with pkg to package a command line example I got from a blog post. The executable created fine but when I try to run the executable, I am getting the following error:
pkg/prelude/bootstrap.js:1244
throw error;
^
Error…

Bill
- 512
- 4
- 14
3
votes
1 answer
Next.js with pkg. Syntax requires enabling one of the following parser plugin(s): 'flow, typescript'
I use next.js with pkg in my project based on this tutorial but when I run pkg command I get an error:
> Error! This experimental syntax requires enabling
one of the following parser plugin(s): 'flow, typescript' (13:7)
…

Arthur
- 3,056
- 7
- 31
- 61
3
votes
1 answer
node js application bundling for macOS
I have developed a node js application. I have managed to bundle my application to a .exe file using node pkg which runs perfectly on windows. Now I need to do the same thing for macOS so that my application can be run on Apple computers.
The node…
3
votes
1 answer
Attempting to use 'pkg' to build 'nextjs' app results in dependency errors and/or 404 errors once built
I'm attempting to build an executable of a small NextJS example app based on the example here using zeit/pkg. Problem is the only feasible entry point (server.js) seems to give me a bunch of errors not currently listed in their issues related to…

prestonsmith
- 758
- 1
- 9
- 29
2
votes
0 answers
How does Pkg handle ES6?
I use class syntax in some of my node modules. I have this config in package.json:
"pkg": {
"service": "./service/**/*",
"assets": "./assets/**/*",
"config": "./config/**/*",
"options": ["experimental-modules"]
},
When running…

fingerskier
- 31
- 5
2
votes
0 answers
Packaging typescript app using zeit's pkg (lib.d.ts not found)
I am trying to package a typescript app using zeit's pkg that was compiled to .js using the typescript compiler tsc. The package seems to be created without any issues, however when I try to run the exe I get the error:
TypeScriptError: File…

Erunehtar
- 1,583
- 1
- 19
- 38
2
votes
0 answers
What files need to be distributed with zeit-pkg produced executable?
If I use pkg (https://github.com/zeit/pkg) to build an exe-file, what other files do I need to distribute with the exe?
It seems the produced .exe includes a copy of Node.js binaries. Therefore it occurred to me shouldn't I include a Node.js…

Panu Logic
- 2,193
- 1
- 17
- 21