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

"TypeError: Cannot read property 'name' of undefined" in Node.js 6.9.1 #86

Closed
also opened this issue Aug 30, 2017 · 6 comments
Closed

Comments

@also
Copy link

also commented Aug 30, 2017

With the recent 1.3.5 release of ref, importing the module throws an error in Node.js 6.9.1. I've seen this on macOS 10.12.6 and 10.11.6

$ npm ls ref
/private/tmp/ref-test
└── ref@1.3.5

$ ~/Downloads/node-v6.9.1-darwin-x64/bin/node
> const r = require('ref')
TypeError: Cannot read property 'name' of undefined
    at overwriteInspect (/private/tmp/ref-test/node_modules/ref/lib/ref.js:1455:14)
    at Object.<anonymous> (/private/tmp/ref-test/node_modules/ref/lib/ref.js:1417:32)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at repl:1:11
>

$ node --version
v6.10.2

$ node
> const r = require('ref')
undefined
@also
Copy link
Author

also commented Aug 30, 2017

Probably related to nodejs/node#9289

@chrisJohn404
Copy link

I am seeing this issue on a windows 10 computer that is running node version v6.6.0. Ref v1.3.4 still works on this version of node.

Tested on Linux (Ubuntu 14, 32 bit and 64bit) running node v5.6.0. Was not running into this error.

@TooTallNate
Copy link
Owner

a1b8216fe7 must have broke older versions. Patch welcome if anyone beats me to it!

@TooTallNate
Copy link
Owner

Ok, so I can repro with v6.9.1, but it doesn't happen on v6.10.3. Can you guys upgrade your Node.js version?

@btsimonh
Copy link
Contributor

btsimonh commented Sep 3, 2017

I've confirmed this works with 6.9.2; however for various reasons don't want to update (right now); have submitted a simple pull request which disables the enhanced inspection if it would not work.....
btsimonh#1

@TooTallNate
Copy link
Owner

Fixed in #89.

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

4 participants