Setting up Nodejs 5.10.1 on Openshift - node.js

I run a Discord bot. I am using Nodejs on Openshift. I was using their latest cartridge until I realized NodeJS 6.3 has an out of bounds bug.
I have been trying to use an earlier version of Nodejs (like 5.10.1), but I don't know how to set up the application in their cartridge. Does anyone know how to go through the setup process?

According to openshift cartridge nodejs readme, you have to set environment variables NODE_VERSION_URL & NPM_VERSION_URL if you want custom version of node/npm :
NODE_VERSION_URL=https://semver.io/node/resolve/4.3.2
NPM_VERSION_URL=https://semver.io/npm/resolve/3.6.0

Related

NodeJS not recognized under Windows 10

I am using the LTS version of NodeJS. The problem started with version node-v16.18.0-x64 and did continue with node-v18.12.0-x64.
What I am doing:
Developing Playwright test. I ran the test and NodeJS was working. After one minute, I rerun the test and NodeJS is no longer recognized in my OS.
The issue appears when I am using Cypress, so I think the issue is not related to the technology that I am using.
I checked the environment variable: It is there.
The workaround I am doing is to uninstall the NodeJS from the control panel and install it again. There is an option to repair the NodeJS installation. But when I try to use it, I receive an error message that the NodeJS is not installed on this OS.

How to update (nodejs14.x) while having node version v16.14.2?

I am beginner in node trying to create rest-api's using node and express. Following the udemy course https://www.udemy.com/course/create-a-rest-api-with-node-js-and-mongo-db/.
In this turbo server is used and site is deployed on that. Now I want to deploy my project on turbo server but getting following error
lenovo#siddhi:~/giftshop-api$ turbo deploy
Deploying to Turbo 360 Hosting Environment...
...............
ERROR: The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while creating or updating functions.
I have installed the node already with version
lenovo#siddhi:~/giftshop-api$ node -v
v16.14.2
How can I use runtime of (nodejs14.x) while creating or updating functions.?
Tried many solutions of from stack overflow but couldn't get it done.
Can anyone help please...
You can install nvm by following the instructions at https://github.com/nvm-sh/nvm
Finally, everything is just
nvm install <node-version>
nvm use <node-version>
You need to run it as admin at cmd

Troubles deploying Nodejs API with Hapi on Azure and Repl.it

I'm using Hapi to run an API testing deployment on different platforms.
First of all I tried Heroku and everything worked fine.
Then I tried to run on Azure Web Apps and it failed with an error
"Hello all.
I'm using Hapi to run an API testing deployment on different platforms.
First of all I tried Heroku and everything worked fine.
Then I tried to run on Azure Web Apps and it failed with an error that error:
First I thought it was some error particular to Azure, but now I'm trying to run on Repl.it and got caught with the same error.
Is it specific to Hapi?
I'm using Yarn to manage my dependencies.
I faced the same issue when I tried to test Hapi on my cloud container before.
For my case, there has compatibility issue between Hapi version (I used v19.1.1) and Node version (my server default version 10.16.0).
The issue is resolved after I upgrade the Node version to 12.16.1 LTS.

Rails 5.2 credentials throwing error

I am using Rails 5.2.0 and Ruby 2.5.1p57.
I have introduced Rails ActiveStorage to my Rails application. I am able to upload/download file to/from S3 if I use AWS key-secret directly.
When I am running below command
EDITOR="subl --wait" rails credentials:edit
1: from /home/nishant/.rvm/gems/ruby-2.5.1#creative_automation/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:157:in decrypt_and_verify'
/home/nishant/.rvm/gems/ruby-2.5.1#creative_automation/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:190:in_decrypt': ActiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage)
This is not my ubuntu system or gemset specific issue as I tried the same thing on other machine but still it is not working.
Thanks in advance.

How to configure latest nodejs in OpenShift?

Today OpenShift supports nodejs version 4, my application in on 6.9.4 LTS.
Is it possible to override default settings and install latest nodejs in OpenShift cartridge?
I am aware about this custom cartridge, my question is on how we could install latest nodejs?
As mentioned this docuentation about Marker" you can specify your NodeJS version by creating a file named NODEJS_VERSION and put your version you needed inside it.
Of course you have to clone it first via git on address specified on your Application setting (called "Source Code" on upper right corner).
git push it would trigger a build and deploy

Resources