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

UNABLE TO DEBUG - Linking error, dependency promises must be resolved on instantiate #17280

Closed
jpike88 opened this issue Nov 23, 2017 · 2 comments
Labels
esm Issues and PRs related to the ECMAScript Modules implementation.

Comments

@jpike88
Copy link

jpike88 commented Nov 23, 2017

  • Version: v8.8.1
  • macOS Sierra: Darwin MacBook-Air.local 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 22:01:05 PDT 2017; root:xnu-4570.1.46~3/RELEASE_X86_64 x86_64
  • Subsystem: ES6 Module loader

I branched my code and converted everything to ES6 import and export statements.

I then ran from the command line the following, and it worked just fine:

node --experimental-modules bin/api-server.mjs

Then I tried to debug with VSCode, and the debugger crashed. I then tried to attach directly from Chrome using chrome://inspect, same issue occurred.

I opened the following issue, which contains the dumps generated from vscode-node-debug which may be worth your attention.

microsoft/vscode-node-debug#165

This error seems to be triggered whenever I try to attach a debugger to the application, using the --inspect-brk flag.

Interestingly, If I use the --inspect flag and attach the debugger shortly after giving my application a moment to figure itself out, everything is fine.

Also importantly, it appears that if I cut big chunks out of my application reducing initialisation time with lots of modules taking ~2 seconds to fire up down to an almost instant startup time... then running with --inspect-brk worked ok as well.

I can only conclude that premature attachment of the debugger is interfering with the ES6 module initialisation stage if that stage is sufficiently long enough... this is a critical issue for developing an codebases with a half decent size.

@mscdex mscdex added the esm Issues and PRs related to the ECMAScript Modules implementation. label Nov 23, 2017
@jpike88 jpike88 changed the title Linking error, dependency promises must be resolved on instantiate UNABLE TO DEBUG - Linking error, dependency promises must be resolved on instantiate Dec 12, 2017
@jpike88
Copy link
Author

jpike88 commented Dec 12, 2017

this seems rather important... is there an ETA on this?

@devsnek
Copy link
Member

devsnek commented Dec 12, 2017

it appears to be being handled with #17360 and #17340

@jpike88 jpike88 closed this as completed Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation.
Projects
None yet
Development

No branches or pull requests

3 participants