Can't install a different Node.js version than 5.11.1 #55

Closed
timaschew opened this Issue Jul 3, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@timaschew

I run this command

NODE_VERSION_URL="https://semver.io/node/resolve/6.2.2" rhc app create stbackend \
https://raw.githubusercontent.com/icflorescu/openshift-cartridge-nodejs/master/metadata/manifest.yml

and I also tried to fork the repo and change the code within lib/util to

  # if [ -n "$NODE_VERSION_URL" ]; then
  #   local VERSION_URL=$NODE_VERSION_URL
  # elif [ -f "$OPENSHIFT_REPO_DIR/.openshift/NODE_VERSION_URL" ]; then
  #   local VERSION_URL=$(cat $OPENSHIFT_REPO_DIR/.openshift/NODE_VERSION_URL)
  # else
  #   local VERSION_URL="https://semver.io/node/stable"
  # fi
  VERSION_URL="https://semver.io/node/resolve/6.2.2"

I always get this output

The cartridge 'https://raw.githubusercontent.com/icflorescu/openshift-cartridge-nodejs/master/metadata/manifest.yml' will be downloaded and installed

Application Options
-------------------
Domain:     timaschew
Cartridges: https://raw.githubusercontent.com/icflorescu/openshift-cartridge-nodejs/master/metadata/manifest.yml
Gear Size:  default
Scaling:    no

Creating application 'stbackend' ... Starting Node.js application...
done

  Node.js v5.11.1 and NPM 3.10.3 installed.
Node.js application started.

@icflorescu icflorescu added the question label Jul 3, 2016

@icflorescu

This comment has been minimized.

Show comment
Hide comment
@icflorescu

icflorescu Jul 3, 2016

Owner

If you're running

NODE_VERSION_URL="https://semver.io/node/resolve/6.2.2" rhc app create stbackend \
https://raw.githubusercontent.com/icflorescu/openshift-cartridge-nodejs/master/metadata/manifest.yml

...you're setting NODE_VERSION_URL in your local environment, not in the OpenShift cartridge.

You'll have to first create the app, then run something like rhc env set NODE_VERSION_URL="https://semver.io/node/resolve/6.2.2" --app stbackend.
The installation of v6.2.2 will then be triggered by your next deployment.

Owner

icflorescu commented Jul 3, 2016

If you're running

NODE_VERSION_URL="https://semver.io/node/resolve/6.2.2" rhc app create stbackend \
https://raw.githubusercontent.com/icflorescu/openshift-cartridge-nodejs/master/metadata/manifest.yml

...you're setting NODE_VERSION_URL in your local environment, not in the OpenShift cartridge.

You'll have to first create the app, then run something like rhc env set NODE_VERSION_URL="https://semver.io/node/resolve/6.2.2" --app stbackend.
The installation of v6.2.2 will then be triggered by your next deployment.

@icflorescu

This comment has been minimized.

Show comment
Hide comment
@icflorescu

icflorescu Jul 3, 2016

Owner

But if you still want to fork this repo, I believe you'll also have to change the Source-Url in metadata/manifest.yml. Make sure it points to your fork.

Owner

icflorescu commented Jul 3, 2016

But if you still want to fork this repo, I believe you'll also have to change the Source-Url in metadata/manifest.yml. Make sure it points to your fork.

@icflorescu

This comment has been minimized.

Show comment
Hide comment
@icflorescu

icflorescu Jul 3, 2016

Owner

Just changed the default version, see #48. From now on, any new app you'll be creating with this cartridge will get the latest by default (= v6.2.2 today).

Please follow up or simply close the issue if you're satisfied with the explanations above.

Owner

icflorescu commented Jul 3, 2016

Just changed the default version, see #48. From now on, any new app you'll be creating with this cartridge will get the latest by default (= v6.2.2 today).

Please follow up or simply close the issue if you're satisfied with the explanations above.

@timaschew

This comment has been minimized.

Show comment
Hide comment
@timaschew

timaschew Jul 3, 2016

I tried to set several properties in the manifest.yml as well, I think I also changed the Source-Url, but maybe I do something different wrong in that case.
But I will just use the new version of this cartridge, thanks!

I tried to set several properties in the manifest.yml as well, I think I also changed the Source-Url, but maybe I do something different wrong in that case.
But I will just use the new version of this cartridge, thanks!

@timaschew timaschew closed this Jul 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment