package.json get version from other package.json file above code example Example: npm get package.json version node -pe "require('./package.json')['version']"