I have built one project in node js. that create a pdf using puppeteer after submitting some from the HTML form. Everything is working fine in localhost. But, pdf in generating in google app engine environment after deploy. This project is on my github profile. Project on Github
Running Puppeteer on GCP is supported now with App engine and Cloud Functions.
Running Puppeteer on Google App Engine
The Node.js runtime of the App Engine standard environment comes with all system packages needed to run Headless Chrome.
To use puppeteer, simply list the module as a dependency in your package.json and deploy to Google App Engine. Read more about using puppeteer on App Engine by following the official tutorial.
Running Puppeteer on Google Cloud Functions
The Node.js 10 runtime of Google Cloud Functions comes with all system packages needed to run Headless Chrome.
To use puppeteer, simply list the module as a dependency in your package.json and deploy your function to Google Cloud Functions using the nodejs10 runtime.
https://developers.google.com/web/tools/puppeteer/troubleshooting#running_puppeteer_in_the_cloud
puppeteer will not work same as expected with google app engine standard environment. You can use a flexible environment with Docker to work as expected. Or you can also use a compute engine with your own configurations.
Related
I developed a node Js application integrated with some services like database, authentication from Supabase, It works fine and gave success results in local development for each routes when called from Postman. Now I want to deploy this application to make rest APIs for frontend. Supabase provides edge-functions. In their documentation they told it is an alternative for firebase functions. But I can't able to find any documentation or blog regarding deployment of node Js application. Is there any way to deploy this application like firebase functions on edge functions of Supabase Any clarification related docs or alternative solutions would be helpful.
Supabase edge functions run Deno application at the moment, which is a bit different from a node.js application, so your node.js application will not deploy directly to Supabase edge functions. You would have to rewrite your code to make it compatible with a Deno application.
Luckily, since typescript, the language used in Deno functions is a superset of javascript, so you should be able to reuse a lot of the code during the rewrite!
error while loading shared libraries: libnss3.so cannot open shared object file
I want to deploy my puppeteer app on google app engine since it says their node.js environment supports the puppeteer however
I get still get this error.
What do I need to do?
Puppeteer requires custom libraries, so you need to make sure you are using the custom environment in your app.yaml:
runtime: custom env: flex
You can find a similar issue in this Github thread.
You also need to check the App Engine documentation for your language that describes dependencies specification to make sure your steps are aligned with the guidelines.
If you are using the App Engine Standard environment, the Node.js runtime of the App Engine standard environment comes with all system packages needed to run Headless Chrome.
To use puppeteer, simply list the module as a dependency in your package.json and deploy to Google App Engine. Read more about using puppeteer on App Engine by following the official tutorial.
So i would like to have a react-native app and use all the cool features from firebase. Since I'm fairly new to firebase though, I'm curious if and how I could possibly install a nodejs environment -which should be hosted by firebase- to add some Api features. Thanks in advance
Firebase itself will not execute your Node.js code, but it has integrations with Cloud Functions and Cloud Run, which can be used precisely for that.
I recommend having a look at the documentation, specifically the pages on serving dynamic content and host microservices using Firebase Hosting.
I am implementing the local execution functionality for my google smart home action. I am following the steps in this link:
https://developers.google.com/actions/smarthome/develop/local
I have already configured the scanning data in the console, and now I am trying to deploy my local execution app. I know how to program in javascript, I have created a couple of firebase functions, but I am not an expert in node.js. I don't understand how to setup and run this javascript app.
I tried to run it on the browser, but it says it cannot find "require", and I read that node.js is not supposed to run on client side. In the link above, it says to create an index.html, that declares the "local_execution.js". Is this javascript module going to run on client side? Can someone point me in the right direction? Maybe explain how to setup the app directory.
Thank you in advance,
Henrique
The best place to get started would be with the local home sample app on GitHub. This sample includes both a local execution app and a compatible virtual device, with instructions to get it compiled and deployed.
For testing, you need to host the web app (HTML/JavaScript) in a location that's accessible to your Home device. This could be a local dev server or something like Firebase Hosting (the sample has instructions for both). The hosted URL goes in the console under Test > On device testing.
I tried to run it on the browser, but it says it cannot find "require", and I read that node.js is not supposed to run on client side.
The Home devices run a browser-based (Chrome) environment, so your JavaScript must be compatible with the browser. If you use Node programming paradigms (e.g. importing modules using require) in your code, you need to use a bundler tool such as Webpack or Parcel to package the code for the browser. The sample uses Webpack to accomplish this.
Side Note: You can't run even a properly packaged local home app in the browser on your development machine because the local home SDK only exists on Home devices.
I am looking to use Web Server for Chrome extension only for the localhost in order to run an app:
https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en
It's easier for me to use this Chrome add on rather than installing Python or XAMPP.
Is it possible to run an app locally this way. If you want to test pages built with Angular, is it possible this way also.
Thanks