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

Trying to access global object #362

Closed
Gmunker opened this issue Nov 13, 2016 · 4 comments
Closed

Trying to access global object #362

Gmunker opened this issue Nov 13, 2016 · 4 comments

Comments

@Gmunker
Copy link

Gmunker commented Nov 13, 2016

I literally just started learning NodeJS, i'm on the 3rd video of my course and I'm being introduced to the global object. The instructor just typed in >global and out came a bunch of stuff. When I type in global or console.log(global) it boots me back to the command line. This happens on both my PC and Laptop both running Windows10.

bilio@vitalityHomeOne ~/desktop
$ node -v
v7.1.0

bilio@vitalityHomeOne ~/desktop
$ node
> global

bilio@vitalityHomeOne ~/desktop
$

Like I said i'm VERY new to NodeJS, i'm not sure what you would need to help me with this. It's very odd to me because it's happening on both my laptop and my PC, but no one else i have asked for help can recreate the issue.

Thanks in advance!

@vsemozhetbyt
Copy link

vsemozhetbyt commented Nov 13, 2016

@Gmunker If you use Node.js 7.1.0 on Windows 10 , it may be this bug. For me, the length of the global output is 8752 chars. i.e. it exceeds the buggy limit. The people you asked for help may use another version of Node.js or another OS, so they can't reproduce.

@vsemozhetbyt
Copy link

vsemozhetbyt commented Nov 13, 2016

@Gmunker Until the bug fix, you can inspect big objects gradually. Just paste in the node REPL this line after each $ node call:

 util.inspect.defaultOptions.depth = 1;

Then, if you type global, the output will be less verbose.

@Gmunker
Copy link
Author

Gmunker commented Nov 13, 2016

I ended up installing 6.9 for now and it works, i'm happy this is something known and is being addressed. Thank you so much for your responses!

@vsemozhetbyt
Copy link

@Gmunker It is fixed in Node.js 7.2.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

No branches or pull requests

3 participants