Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspector is not available #921

Closed
Nikamura opened this issue Feb 2, 2021 · 2 comments · Fixed by #925
Closed

Inspector is not available #921

Nikamura opened this issue Feb 2, 2021 · 2 comments · Fixed by #925

Comments

@Nikamura
Copy link

Nikamura commented Feb 2, 2021

We are building our application using https:/vercel/pkg and after migration from v2.19.4 to v2.20.0 of rollbar.js lib it started to break. We are using Node 12, but happens on Node 14 as well.

pkg package.json --targets node12-macos-x64 --output server-start
Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available
    at inspector.js:24:9
    at NativeModule.compileForInternalLoader (internal/bootstrap/loaders.js:277:7)
    at NativeModule.compileForPublicLoader (internal/bootstrap/loaders.js:219:10)
    at loadNativeModule (internal/modules/cjs/helpers.js:24:9)
    at Function.Module._load (internal/modules/cjs/loader.js:848:15)
    at Module.require (internal/modules/cjs/loader.js:1024:19)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/snapshot/canary/node_modules/rollbar/src/server/locals.js:2:17)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
    at Module.load (internal/modules/cjs/loader.js:984:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1024:19)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/modules/cjs/helpers.js:72:18)

which seems to be introduced by #902 this PR.

Downgrading the package to an earlier version doesn't throw the error.

@waltjones
Copy link
Contributor

@Nikamura thank you for the report.

The root issue here is that vercel/pkg isn't actually using Node. It builds its own "base binaries" that are a subset of Node.

pkg has so called "base binaries" - they are actually same node executables but with some patches applied. They are used as a base for every executable pkg creates.

This has been reported in vercel/pkg Github Issues a number of times, and in this one, a workaround is suggested. vercel/pkg#93

I'll look into what workaround might be possible in Rollbar.js.

@waltjones
Copy link
Contributor

@Nikamura v2.21.0 now loads the locals module separately, and the vercel/pkg builds should work now.

https:/rollbar/rollbar.js/releases/tag/v2.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants