How to upgrade Nodejs 8 version to Nodejs 10 version in google cloud?

Vikas Kohli
2 min readSep 27, 2019

--

When I deploy the google cloud build, it gives a warning “ Starting October 1, 2019, new deployments using these versions will not be available. However, applications that have already been deployed using these versions will continue to run.” from Google Cloud Docs

Then in the YAML file for the development server, I just changed the NOdeJsversion and the deploy the app, it deploys successfully but in the google cloud server logs, it throws an error of bcrypt library as the project is using and in the logs it says.

Then for reinstalling the build, didn’t find any relevant docs for the same. After struggling with it find some commands but none of them working for me and then found the “gcp-build” command which I wrote in the package.json file under the script tag and then it works.

//package.json file
{
"name": "myproject",
"version": "0.1.0",
"scripts": {
"prepare": "npm run gcp-build" //this line reinstall npm packages
...and other scripts
}
"private": true,
"dependencies": {
...and so one
}
}

Now deploy the build again and there was no error and it perfectly works and now successfully upgraded to NodeJs10 version from 8.

--

--

Vikas Kohli
Vikas Kohli

Written by Vikas Kohli

B.E Software Developer, Enthusiastic, Ego-surfing

Responses (1)