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

Cannot find module 'internal/linkedlist' #7

Closed
stefanjudis opened this issue Feb 16, 2016 · 21 comments
Closed

Cannot find module 'internal/linkedlist' #7

stefanjudis opened this issue Feb 16, 2016 · 21 comments

Comments

@stefanjudis
Copy link

Heyo, I just wanted to play around with this to see how it works.
Apparently I don't get it to work. :(

I've got a simple index.js.

var log = require('why-is-node-running') // should be your first require

log();

And why-is-node-running is available installed in my node_modules.

That's what I got:

stefan @ stefan-mac: ~/Downloads/test
> node --version
v5.0.0

stefan @ stefan-mac: ~/Downloads/test
> node ./index.js
module.js:339
    throw err;
    ^

Error: Cannot find module 'internal/linkedlist'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at timers.js:4:11
    at NativeModule.compile (/Users/stefan/Downloads/test/node_modules/why-is-node-running/core.js:108:3)
    at Function.NativeModule.require (/Users/stefan/Downloads/test/node_modules/why-is-node-running/core.js:52:16)
    at Object.globalTimeouts (/Users/stefan/Downloads/test/node_modules/why-is-node-running/core.js:14:31)
    at Object.<anonymous> (/Users/stefan/Downloads/test/node_modules/why-is-node-running/index.js:50:6)
    at Module._compile (module.js:425:26)
FAIL: 1

Thanks.

Any hints are more than welcome. :bowtie:

@silverwind
Copy link

Also been hit by this, Node.js 5.7.0.

@johshoff
Copy link

Seeing this too. Node version 5.4.0 and both why-is-node-running@1.1.2 and why-is-node-running@1.2.1

@voxpelli
Copy link

Experienced this as well on Node 5.6.0 and 5.0.0 but not on 4.2.1 – so it appears to be an incompatibility with Node 5

@voxpelli
Copy link

Probably related to nodejs/node#3078

@wesleytodd
Copy link

Anyone find a resolution for this? I can downgrade to 4 for a bit I guess, but if there is something simple we can do that would be great. Thanks!

@silverwind
Copy link

Maybe try with node --expose-internals script.js.

@wesleytodd
Copy link

Worked!! Thanks!

EDIT: worked with node 5.7.0

@nolanlawson
Copy link

Downgrading to Node 4.2.3 worked for me.

@fresheneesz
Copy link
Contributor

fresheneesz commented May 12, 2016

--expose-internals works for me on node v5.1.0 - thanks! I made a pull request to document this: #15

@bojidar-bg
Copy link

Would be nice if this is done in the cli as well... 😄

@Matthew-Davey
Copy link

Matthew-Davey commented Nov 22, 2016

--expose-internals works for me on v6.3.1

@mafintosh
Copy link
Owner

would be cool if we could add that switch to the cli somehow

@megakoresh
Copy link

Yes, I would like to have this switch in the cli options too.

@sibelius
Copy link

sibelius commented Jun 6, 2017

Can somebody document how to use with node 6 or node 8?

@silverwind
Copy link

silverwind commented Jun 13, 2017

I'm not sure if this is runtime-configurable, but can someone affected try adding

process.binding('config').exposeInternals = true

at the top of their script, and report back if that works?

@mafintosh
Copy link
Owner

oh interesting. I'll try later

@maksimioffe
Copy link

i am affected on v7.7.3, the --expose-internals workaround worked for me, but process.binding('config').exposeInternals = true did not

@silverwind
Copy link

Ah, that exposeInternals option does nothing as the variable is checked only earlier in the node bootstrap process, before any user script runs. I have a feeling this can only be solved by a change in node itself, but IIRC, internal modules are shielded from user code for a reason.

@mo
Copy link

mo commented Jul 10, 2017

I hit this today using node v7.7.2 and I'm using babel-node so --expose-internals doesn't work for me

@4O4
Copy link

4O4 commented Dec 4, 2017

Too bad it's closed without clear solution. I've just hit the same wall 😞

@huan
Copy link

huan commented Jan 29, 2018

I ran into this issue under node v8.6 with --expose-internals

It's like #21 re-appear in node v8.6

There are 1 known handle(s) keeping the process running and 2 unknown
Known handles:

not ok 2 TypeError: Cannot read property 'indexOf' of null
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [TypeError: Cannot read property 'indexOf' of null]
    stack: |-
      TypeError: Cannot read property 'indexOf' of null
          at /home/zixia/chatie/wechaty/node_modules/why-is-node-running/index.js:72:29
          at Array.filter (<anonymous>)
          at /home/zixia/chatie/wechaty/node_modules/why-is-node-running/index.js:71:21
          at Array.forEach (<anonymous>)
          at module.exports (/home/zixia/chatie/wechaty/node_modules/why-is-node-running/index.js:68:9)

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

No branches or pull requests