question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Log Node.js version using

See original GitHub issue

Couple of things.

First if you specify node-version of 10, does that use the absoute latest version of Node.js v10 (both minor and patch versions)?

Second, does node-version of 10.x use the latest version when taking account patch versions? Or does .x just mean the minor version?

Finally, it’d be great if this action printed the Node.js version it decided to use in the logs of GitHub Actions so developers can determine which Node.js version it decided to use, which would make debugging SO much easier.

Screen Shot 2019-11-22 at 3 49 46 PM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
joshmgrosscommented, Feb 21, 2020

👋 Hey @fishcharlie. Specifying a node-version of 10 and 10.x will have the same result. This follows semver, where 10 == 10.x == 10.x.x, which is effectively "the latest version of Node.js v10 taking into account both minor and patch versions.

Finally, it’d be great if this action printed the Node.js version it decided to use in the logs of GitHub Actions

Great idea! That should be a quick fix.

3reactions
bryanmacfarlanecommented, Apr 10, 2020

@joshmgross - I’m fine with you picking this up. If you do, look at recent commits in setup-go where I did it. I think it should also output npm version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Log nodeJS version - Stack Overflow
... to check which node version it's using. Something like console.log(node.version) would be ideal. Anyone know how to do that? node.js.
Read more >
How to check the current Node.js version at runtime
How to check the current Node.js version at runtime ... Run process.version : The version property of the process object returns a string...
Read more >
Node.js Logging Tutorial - Stackify
Node.js logging is an important part of supporting the complete application life cycle. From creation to debugging to planning new features, ...
Read more >
Console | Node.js v19.3.0 Documentation
A Console class with methods such as console.log() , console.error() , and console.warn() that can be used to write to any Node.js stream....
Read more >
How to Get Started with Logging in Node.js - Better Stack
Before you proceed with this article, ensure that you have a recent version of Node.js and npm installed locally on your machine.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found