1

This answer explains how to read the package.json "version" from a npm started application. Is there an env variable in Meteor (1.3+) with this info?

Community
  • 1
  • 1
Adriano P
  • 2,045
  • 1
  • 22
  • 32

1 Answers1

4

Well, there is not npm_package_version environment value in process object.

But you get the value of version using following code :

var pjson = require('/package.json'); 
console.log(pjson.version); // This will print the version
Pankaj Jatav
  • 2,158
  • 2
  • 14
  • 22
  • 1
    Good one, Pankaj. Maybe it'd be a good idea to wrap it in a server method to avoid sharing restricted info to the client. – Adriano P Aug 03 '16 at 13:40