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
2
votes
2 answers
Zeit/pkg: Cannot find module 'config'
I've distilled this issue down to a simple test. I'm using the node "config" module to define configuration values for my app. Pkg doesn't complain on build, but barfs at runtime with the following message. Am I missing…

Jim B.
- 4,512
- 3
- 25
- 53
1
vote
0 answers
Module not found: Can't resolve '@babel/runtime-corejs2/core-js/array/is-array' in '/snapshot/frontend/node_modules/next-server/dist/lib'
Can someone check this...
I really need help, because I'm stuck
https://github.com/MustansirZia/next-express-bootstrap-boilerplate/issues/10
Thanks in advance
Carlos Vieira
pkg app.js
> pkg@4.4.0
> Targets not specified. Assuming:
…

Carlos Vieira
- 559
- 2
- 10
- 22
1
vote
1 answer
Create executable file for NodeJS project with MERN architecture
** See EDIT below **
I have created a simple MERN (Mongo, Express, React, NodeJS) application to form the base of a project. I am exploring the possible ways of creating executable files for deployment once the application is completed. The…

Weagertron
- 161
- 2
- 12
1
vote
1 answer
zeit/pkg Error! ESOCKETTIMEDOUT
I'm trying to package my node project with zeit/pkg.After running the command pkg.,I got this error:
$ pkg .
pkg@4.3.3
Fetching base Node.js binaries to PKG_CACHE_PATH
Error! ESOCKETTIMEDOUT
Asset not found by direct link:
…

Wendy
- 11
- 3
1
vote
1 answer
Make node script packaged with zeit-pkg aware of full filesystem
I have a node script which uses command line parameters using the module commander.
I want to pack it with pkg, but I am running into some trouble.
Normally I would execute my script with:
node index.js --file ./test.csv
but the file argument…

telex-wap
- 832
- 1
- 9
- 30
1
vote
2 answers
Node js - How to create an executable with pkg
I'm trying to create an executable in my node.js project with pkg and I can create this but without css files.
So, I install pkg with npm install -g pkg, in package.json I add this:
"pkg": {
"scripts": "public/js/*.js",
"assets":…

user3242861
- 1,839
- 12
- 48
- 93
1
vote
1 answer
Now is not recognized as an internal or external command - when attempting to host a page with Zeit
"scripts": {
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
…
user8672583
0
votes
1 answer
How can I read or copy assets out of an .exe packaged with vercel/pkg?
I have a pkg-packaged .exe I need to copy files out of - which I'm aware may not be possible - but surely there's some way to get the asset files out, right?
I'm quite confident that the assets are included in the pkg after I added this to my…

Slbox
- 10,957
- 15
- 54
- 106
0
votes
1 answer
"Could not find a required file. remote: Name: index.html" This the error I get whenever I deploy my ReactJS app via Heroku, Zeit/Now or Netlify
I created my react app with the create-react-app utility which places the index.html file in the public folder by default. I have not moved it from there and it is the exact same way in the repo link to the public folder. I've already checked my…

qb1234
- 155
- 2
- 14
0
votes
1 answer
Why my NodeJS app after packing with Zeit pkg is running as a background process in Linux mint cinnamon 19.1
Hello!
I am using Linux mint cinnamon 19.1 and I have some NodeJS project and want packing to a single executable using zeit pkg targeting to platform Linux and Windows. Process packaging is running well, but...
The problem is
When I open that…

Firmansyah
- 106
- 12
- 27
0
votes
1 answer
fs.rmdir recursive stops working after app is packaged
fs.rmdir recursive stops working after app is packaged with Zeit/pkg
The following script works in 2 cases:
The script is ran unpackaged directly from node as node test.js and works perfectly
The script is ran packaged and the tmpDir is empty.…

Jake
- 1,380
- 3
- 14
- 27
0
votes
1 answer
How can I package my express app assets and scripts properly with zeit/pkg
I'm trying to package my express app with pkg on Windows 10.
When I package the app like so:
pkg package.json -t node10-latest-win-x64 -o webapp-win
the executable in the app directory works fine.
But I want to ship the app without my sources and…

naitbas
- 11
- 7
0
votes
1 answer
How can I set up a redirect with Zeit's Now 2.0?
Currently I'm trying to redirect from root.com/robots.txt to beta.root.com/robots.txt.
This is not working currently, any idea why?:
{
"version": 2,
"alias": ["root.com"],
"routes": [
{
"src": "/(.*)",
"status": 301,
…

Thingamajig
- 4,107
- 7
- 33
- 61
0
votes
1 answer
Cannot find included .ps1 file in zeit/pkg npm to run node-powershell command
I am struggling to find the right syntax of calling a powershell script using node-powershell and compile all that into a single .exe file using the zeit/pkg syntax. How can I specify the path to the correct PS1 file that is compiled in using the…

Dale Bingham
- 362
- 4
- 13
0
votes
0 answers
How can I run packaged executable node.js app from child process script?
I am trying to run executable from bash script. Executable is nodejs app packaged with zeit-pkg.
What I am doing:
Run child process. Child process kills parent, replaces the app with the new version and runs app again.
const fileName =…

AlbertS
- 706
- 5
- 12