How to upgrade Node.js in OpenShift Gear - node.js

I am trying to add a Meteor.Js project to an OpenShift Gear by following this tut:
https://www.openshift.com/blogs/cloudy-with-a-chance-of-meteorjs
I had to use mongoDB-2.4 other than that I followed the rest of the tut.
upon pushing my project to the Gear and getting a success status from the rhc cli, I went to the URL and got a 503. Then I restarted the app, with the same results. Then I used the command:
rhc tail <appName> #<appName> is the actual name of my app
And got the error code:
Meteor requires Node v0.10.26 or later.
DEBUG: Program node meteorshim.js exited with code 1
DEBUG: Starting child process with 'node meteorshim.js'
After that I destroyed the gear and tried again this time changing the created package.json created by the meteor-shim to node version to '0.10.29' (it had originally said 0.10.9), I run 0.10.29 on my machine.
I bundled and pushed this one, with the same results. So I ssh'ed into the Gear and typed 'node -v' and it outputted
v0.6.20
How do I at least get node version 0.10.26?
Note: The Cartridge in the Application web interface says node.js 0.10

The answer is you can't get v0.10.26 or later on OpenShift currently. At least not that I know of. v0.10.25 seems to be the latest version you can get on OpenShift at the moment.
Although it shows v0.6.20 doing "node -v" while you're on their system, it's actually running v0.10.25 if you created your app as node v0.10. When you push your code on there, check the output, one of those lines should be:
remote: npm info using node#v0.10.25
I've tried changing the version in package.json as below to see if it works but v0.10.25 is the latest version OpenShift is currently providing:
"engines": {
"node": ">= 0.10.26", <<<<< it's not taking this version
"npm": ">= 1.0.0"
},

Related

How to know what version of node I need to run a react app?

I have a react app, the npm install and npm start operations to run it on node v12.18.2 work perfectly but gives error on node v17.3.0. So how to know what versions of node can i use for the app to run successfully.
The React application has a package.json file and in this file, it is usually specified the version of node it needs to run successfully. This information can be found in the section called engines
{
"engines": {
"node": ">=0.10.3 <15"
}
}
The above code says that the application runs successfully if the version of node is higher than 0.10.3 but lower than 15.

Node version different when using NPM

I tried to find a duplicate question, there are similar ones but I still don't understand what's going on..
I just installed node and npm on Ubuntu 20.04 with
sudo apt install nodejs npm
And followed the Electron quick start tutorial, and added this line to the beginning of my main.js:
console.log("node version: " + process.versions["node"]);
When I run my app with npm start, I see (both on the console and on the app) node version 16.13.0, but when I run the app with node main, I see the version as 10.19.0, which is also what node -v shows.
I can probably "fix" this issue by updating node, but I would like to understand what is going on here.. Is NPM using a different node version or something?
Thanks
Edit
I tried this with an empty node app, just made npm init and set start: "node index.js" in package.json, this time both node index.js and npm start show the same version (10.19.0) so I'm guessing Electron is somehow reading a wrong node version?
#DJHemath is spot on. Electron has Node and Chromium as internal libraries. IE: Node is a module of Electron.
Therefore, the version you are seeing within your Electron application is the Node version that is bundled with Electron.
When Electron is updated, the versions of Node and Chromium are often updated as well. An overview of this can be seen on the Electron homepage "Releases" cards (latest, beta, alpha and nightly).
Additionally, for historical purposes, version updates of these two dependencies can be seen on the Stable Releases page.
Thus, in summary, changing your system's installed Node version will not affect the version of Node used within your Electron application(s).

Firebase not updating to Node 12

Following the instructions here:
https://firebase.google.com/docs/functions/manage-functions#upgrade-node10
I have already changed my package.json engine to 12:
"engines": {
"node": "12"
},
and my Firebase CLI version is:
firebase -V
9.5.0
However even after deploying functions it says I am still on Node 10:
node -v
v10.16.0
Any idea what the problem is?
The node found in your command line doesn't have anything to do with the config for your firebase CLI in package.json. Changing package.json does not affect your node installation in any way. If you are working with Cloud Functions, the only thing that happens when you change "engines" is the target version of node used by the cloud service (not your machine) after you deploy your functions.
If you want to update the node version on your machine, you will have to do that independently of the Firebase CLI. You will need to follow whatever instructions are relevant for your machine to do that (apt? homebrew? nvm? we don't know) - Firebase will not be able to help.

Node JS supported versions on Heroku

I am trying to Push my GIT version onto heroku and i am finding the current version of node js 13.12.0 is not supported. what version is supported and how can i deploy .
It is giving deployment error and rejecting the deployment to my application in heroku
Hello I run into the same problem and I write
"engines": {
"node": "13.x.x"
}
The last version supported by heroku right now is 13.11.0
You can see for yourself in
https://devcenter.heroku.com/articles/nodejs-support

Meteor: Unable to Deploy, requires Node v0.10.40 or later

I recently updated my meteor to version 1.2.0.2 and now I can't seem to be able to deploy. I get the following error.
[104.236.123.456] error: Forever detected script exited with code: 1[104.236.123.456]
[104.236.123.456] error: Script restart attempt #16[104.236.123.456]
[104.236.123.456] Meteor requires Node v0.10.40 or later.[104.236.123.456]
I am using mup, so I changed the version in mup.json from 0.10.36 to 0.10.40 and it still throws the same error. I am using digital ocean, should this be an update to the node version in digital ocean? I have tried doing a search for node update but nothing shows up, so not sure if this is the issue.
Any help is appreciated.
Updating your node version inside mup.json won't actually upgrade the node version installed on the server, have you tried using mup setup again to reinstall node on the droplet ?

Resources