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

Error: linking error, not in local cache when using --inspect-brk for es modules #18948

Closed
lukaszewczak opened this issue Feb 23, 2018 · 3 comments
Assignees
Labels
esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. inspector Issues and PRs related to the V8 inspector protocol

Comments

@lukaszewczak
Copy link
Contributor

  • Version: 9.6.1
  • Platform: Windows 64-bit
  • Subsystem: inspector

Hi, I try to run debugger for es modules using --inspect-brk flag, but after I attached Chrome Dev Tools I receive this error

internal/loader/ModuleJob.js:31
        initWrapper(this.module.instantiate, this.module);
        ^
Error: linking error, not in local cache
    at link (internal/loader/ModuleJob.js:31:9)
    at <anonymous>

I create two small files to test debuuger:

  • index.mjs
import {add} from './calc';

console.log(add(5, 6));
  • calc.mjs
export function add (a, b) {
    return a + b;
}

I try to run code with this command node --experimental-modules --inspect-brk index.mjs.

I updated my Chrome to version 64.0.3282.186.
I try this with the same result on Chrome Canary 66.0.3352.0.

I do not have any breakpoints set up but after I attached Dev Tools, code is always break on internal/async_hooks.js:157 and after I resume script execution I receive above error.

image

@devsnek devsnek self-assigned this Feb 23, 2018
@devsnek
Copy link
Member

devsnek commented Feb 23, 2018

it appears the breakpoint was mounted in the wrong place, i'll dig around

@devsnek devsnek added inspector Issues and PRs related to the V8 inspector protocol experimental Issues and PRs related to experimental features. esm Issues and PRs related to the ECMAScript Modules implementation. labels Feb 23, 2018
@dandv
Copy link
Contributor

dandv commented Feb 28, 2018

This breaks debugging with WebStorm.

https://youtrack.jetbrains.com/issue/WEB-30325

@devsnek devsnek closed this as completed in abd0d79 Mar 1, 2018
addaleax pushed a commit to addaleax/node that referenced this issue Mar 5, 2018
PR-URL: nodejs#18949
Fixes: nodejs#18948
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@amalshehu
Copy link

Had the same issue. But it got fixed in node v9.11.1

MayaLekova pushed a commit to MayaLekova/node that referenced this issue May 8, 2018
PR-URL: nodejs#18949
Fixes: nodejs#18948
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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. experimental Issues and PRs related to experimental features. inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

No branches or pull requests

4 participants