Cannot find module 'yargs' error while deploying node.js app to google cloud platform - node.js

I am trying to deploy my node.js application to google cloud and my package.json includes the yargs as dependencies.
And when I deploy the app to google cloud and after that I am getting error can't find module yargs in google cloud platform logs.
How can I solve the above issue?

i had this problem too. all you need to do is installing 'yargs' locally by
npm init
npm i yargs --save
you can see the complete guide here

Related

playwright Chromium browser not installed in heroku platform while deploying meteor app

We are deploying meteor app with nodejs in heroku platform.
meteor#1.9.2
Nodejs#1.14.1
Playwright#1.14.0
https://github.com/playwright-community/heroku-playwright-buildpack.git
https://github.com/sunny/chromium-buildpack.git
After deploying the app getting following error
after installed following command
npx playwright install.
But still same issue can anyone facing like this issue or give guidance thanks

Im having trouble while serving or deploying Firebase Hosting Functions

The Cloud Functions emulator requires the module "firebase-admin" to
be installed. This package is in your package.json, but it's not
available. You probably need to run "npm install" in your functions
directory.
I was running well my project till i was hit with that issue. Any help, please do tell. Thanks. {Below is the image of what i am getting}
This is a bug in firebase-tools versions 6.9.0 and 6.9.1. The solution is to downgrade to 6.8.0 for now:
npm install -g firebase-tools#6.8.0
You can follow along with the issue here:
https://github.com/firebase/firebase-tools/issues/1262

using firebase-admin in netlify function

I am trying to use firebase-admin npm module in a Netlify cloud function. By default netlify-lambda packages the functions with Webpack, which breaks firebase-admin as it's not compatible with Webpack.
I tried using the alternate "zip n ship" method but even that doesn't works. From the error, it seems the node_modules generated on my machine are not working correctly on the machine where the function is deployed. Here is the error:
Error: The gRPC binary module was not installed. This may be fixed by running "npm rebuild"
Original error: Cannot find module '/var/task/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node'
Anyone who has made this work?
you can use Webpack to generate new package.json file into the lambda directory and install its dependencies, then run netlify-lambda as this tutorial shows firebase-admin-with-netlify-lambda

Google Cloud - nodejs deploy yarn could not be run

When deploying nodejs application in Google Cloud I'm getting attached image error.
I was trying sample nodejs application from below attached url.
https://cloud.google.com/nodejs/getting-started/hello-world
yarn will not be installed with Node.js, the default package manager is npm, if you want to use yarn, you need to install it first npm install -g yarn.

Does heroku support Express 3.0?

I'm trying to deploy a node.js application to heroku, and get an error:
Installing dependencies with npm
npm ERR! Error: No compatible version found: express#'>=3.0.0'
When deploying from Cloud9. Does heroku support express 3.0?
You probably haven't specified what version of Nodejs your app supports.
https://devcenter.heroku.com/articles/nodejs-versions
By default, it uses Node 0.4.7, which will not work with express 3.x. I think you will need at least Node >= 0.5.0.

Resources