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.
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:1614throw error;^Error: EISDIR: illegal operation on a directory, readat 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 -gAttaching sample code to reproduce the issue:
app2.txt
Package.txt
How can I fix it generally? Or any changes required from my side.