Google Cloud - nodejs deploy yarn could not be run - node.js

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.

Related

How to install openlayers on host (cpanel)

I need help, currently I have developed on my computer with node js and git a gis application using openlayers . Now I try to install it on hosting in cpanel but I can't. Please help me because I've been trying for several days and I can't. I couldn't find a complete tutorial on how to install openlayers. I mention that I am new in this field.
I created an app with nodeJS in Cpanel, after i installed GIT with repository. On openlayers website, i followed the steps with npm create ol-app my-app, cd my-app, npm start. After this all i see when i acces the webpage is tha message from NodeJS "It works! NodeJS 16.17.1".

Firebase Server complains that firebase-admin is installed but not seen

I tried running firebase serve on my local machine and gets below warning
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.
What I've tried from previous SO and github
npm install from folder functions
delete node_modules and re-run npm install
run npm install --save firebase-admin
SO and github references but non solved my problem
The Cloud Functions emulator requires the module "firebase-admin" to be installed
Im having trouble while serving or deploying Firebase Hosting Functions
https://github.com/firebase/firebase-tools/issues/1452
PS:
Downgrade to version 6 is not an option.
I'm running node 8 and "firebase-admin": "^8.6.0" as shown from package.json
With the help of Hiranya Jayathilaka comment above I was able to fix this. I upgraded my node from 8.5.x to 8.16.2 and run npm install firebase-tools and everything works fine.

Can i setup Angular 6 without using/installing node.js/npm?

I know there is an easy solution with Angular CLI but is it possible to setup and run an Angular app without installing Node.js or running npm commands in the terminal.
Any suggestions would be appreciated.
Not really, no. Angular has a complicated build process that isn't realistically doable without having Node installed. If you really can't/won't install NodeJS, perhaps try an online IDE such as stackblitz.
I think it's impossible to build an app with Angular and without Node if you want to use Local IDE like VSCode
It's not recommended for sure. the best alternative way is to use yarn + Angular CLI.
You can use Online IDE if you won't install node and npm on your machine. (http://stackblitz.com)
Yarn is an alternative package manager for npm, so you can use it.
Update to use Yarn with Angular CLI
ng set --global packageManager=yarn
and to revert this change :
ng set --global packageManager=npm

Amazon AWS Node.js WebSocket

With the Amazon AWS Free Usage Tier, how should I deploy a simple Node.js WebSocket chat server that uses the ws & pg modules?
If you can: How to deploy a Node.js WebSocket server to Amazon Elastic Beanstalk?
Otherwise, what are all the steps I should take to set it up using EC2 directly?
Or, should I do it with OpsCloud?
You CAN use Elastic Beanstalk with the free usage tier. However if you want to run both Postgres and Node.js, you might find you need to roll your own EC2 instance to remain within the free usage constraints - check here: http://aws.amazon.com/free/
EB does make it relatively simple to deploy, and if you do your development setup correctly, EB will install the extra node modules you need.
In any case, when developing you will find you need to install new modules - I'm sure you're familiar with the npm install mechanism. What you need to add to that is the --save option, so
npm install pg
becomes
npm install --save pg
This then adds that package to the dependencies section of the package.json file. When you deploy to EB or any other dev ops system, these dependencies are automatically installed (the system runs npm install). If you are cloning from a repository onto your server, then running npm install yourself will install those modules.
Hopefully this helps you get the modules you need installed on the server. It's worth noting that your node_modules directory should not be shipped with your code - let the system build it when deploying.

Amazon EC2 NodeJS npm does not install modules

I just configured a new micro intsance on amazon ec2.
I checked out node source code and build it.
Now i want to setup express and other node modules but npm does not work.
When i give command e.g. npm install express, it waits there without any further process.
Any help appreciated.

Resources