Skip to content

How to make one project use one Node version while running another project on another Node version at the same time? #922

Discussion options

You must be logged in to vote

Update
I've updated the examples in the How can I use two different versions of Node.js at the same time?.

You should be able to run it the same way you'd display the version.

Assuming a package.json file like this:

{
  "name": "tmp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "echo \"running script from package.json...\""
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "porthog": "^1.0.1"
  }
}

To execute the dev script, run a command like this:

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ashkan-ahmadi
Comment options

@coreybutler
Comment options

@ashkan-ahmadi
Comment options

Answer selected by ashkan-ahmadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants