Skip to content

Exe throws error after adding process-list library #38

Description

@vaibhavrmore1

I am using the Process-List library to get the process in my node code.
It works fine when I call the js file directly.
But it throws the below error when I try to run when it is packaged with the pkg command.

Error:
pkg/prelude/bootstrap.js:1614
throw error;
^
Error: EISDIR: illegal operation on a directory, read
at error_EISDIR (pkg/prelude/bootstrap.js:553:17)
at readFileFromSnapshot (pkg/prelude/bootstrap.js:894:33)
at Object.readFileSync (pkg/prelude/bootstrap.js:938:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:786:20)
at Module.load (internal/modules/cjs/loader.js:651:32)
at tryModuleLoad (internal/modules/cjs/loader.js:591:12)
at Function.Module._load (internal/modules/cjs/loader.js:583:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at Module.require (pkg/prelude/bootstrap.js:1593:31)
at require (internal/modules/cjs/helpers.js:25:18)

Command used to package is :
pkg -t node10-win-x64 --compress GZip -o ".\ProcessList.exe" ".\app2.js"

pkg version is latest:
npm install pkg -g

Attaching sample code to reproduce the issue:
app2.txt
Package.txt

How can I fix it generally? Or any changes required from my side.

No activity

Activity on this issue will appear here.

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