Home > Enterprise >  heroku nodejs dependencies synthax
heroku nodejs dependencies synthax

Time:10-17


Which is the syntax to specify a module dependency on any (or last) version ?

I know that for a specific one, the synthax is :
 "dependencies": {
    "express": "^4.9.8"
  },

Best regards

CodePudding user response:

While installing you can install with npm install express for the latest version.

If you want a specific version. You can install with npm install [email protected]

CodePudding user response:

Ok,
The answer from Chris seems to be the good one : from "https://docs.npmjs.com/about-semantic-versioning" :

"You can specify which update types your package can accept from dependencies in your package's package.json file.
For example, to specify acceptable version ranges up to 1.0.4, use the following syntax:
Patch releases: 1.0 or 1.0.x or ~1.0.4
Minor releases: 1 or 1.x or ^1.0.4
Major releases: * or x"
  • Related