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 [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available
at inspector.js:24:9
at NativeModule.compileForInternalLoader (internal/bootstrap/loaders.js:276:7)
at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:218:10)
at loadNativeModule (internal/modules/cjs/helpers.js:25:9)
at Function.Module._load (internal/modules/cjs/loader.js:906:15)
at Module.require (internal/modules/cjs/loader.js:1087:19)
at Module.require (pkg/prelude/bootstrap.js:1225:31)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (/snapshot/ginit/lib/repo.js:11:17)
at Module._compile (pkg/prelude/bootstrap.js:1320:22) {
code: 'ERR_INSPECTOR_NOT_AVAILABLE'
}
I put the package on github and here is the link: Link to github
Any help is greatly apprecited on how to get this to work.
This Error comes up when we try to Start the executable in
DEBUG
mode.Since
pkg
doesn't allow Inspecting the run-time code of the executable this error Inspector is not available shows up.I was trying to
spawn
the executable from another program (which was running inDEBUG
mode) and it caused the same issue. But when I started the program in normal mode, it worked like a charm