Skip to content

Problem with packaging GUN application using pkg #1407

Description

@LAKSHYAJAIN16

Hi!

I'm developing an app which requires me to package my gun app using pkg.

The app loads successfully, but every 2 seconds or so I get this error

Error: Cannot write to packaged file
    at writeToSnapshot (pkg/prelude/bootstrap.js:964:16)
    at Object.write (pkg/prelude/bootstrap.js:980:12)
    at writeAll (node:fs:2126:6)
    at node:fs:2191:7
    at zalgoSafe (pkg/prelude/bootstrap.js:432:10)
    at pkg/prelude/bootstrap.js:766:9
    at FSReqCallback.oncomplete (node:fs:201:23)

Here's the code

// gun-server.js
const Gun = require('gun');
require('gun/sea');
require('gun/lib/webrtc');

const http = require('http');
const server = http.createServer().listen(8765);

Gun({ web: server });

console.log('🔫 GunDB peer running at http://localhost:8765/gun');

Terminal

Image

nothing too complicated. how do i resolve this error?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions