npm ERR! Invalid version: "1"

in my case was

"version": "1"

I've edited to

"version": "1.0.0"

and it fixes.


In package.json the 'engine' properties allows you to block the node.js application running on versions of CLI tools which are unsupported.

You can either remove or modify the values. From quickly looking at the gcloud documentation they are using the latest stable from node.js (v9.4.0) which is bundled with npm v5.6.0. You could allow your application to run with existing versions and greater by adding the greater than character before the version.

"engines": {
    "node": ">6.9.4",
    "npm": ">4.2.0"
},