node get version from package.json code example
Example 1: npm get package.json version
node -pe "require('./package.json')['version']"
Example 2: node get package.json version
process.env.npm_package_version
node -pe "require('./package.json')['version']"
process.env.npm_package_version