I need to programmatically access the current node version running in a library I am writing. Can’t seem to find this in the docs.
I need to programmatically access the current node version running in a library I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Look at process.version property.
Update 2023-09-05:
As noted below, the
process.versions.nodefield provides the bare semver string (w/out the "v" prefix). Readers may find the following to be a convenient shorthand for accessing the different semver fields: