Google App Engine - Node.js with all locales - node.js

I have developed a Node.js application on my system. The app is using French locale and is working properly on my system because I installed Node.js with --with-intl=system-icu option.
When I deploy it to google using gcloud app deploy it doesn't work properly. I searched online and found that the default installation of Node.js doesn't contain all the locales.
Is there any way I can install Node.js with all locales for the Google App Engine?

You can install things that are not offered by default in Google App Engine if you use Custom Runtimes in the Flexible Environment.
Custom Runtimes let you define your own Dockerfile where you can add commands like:
RUN npm install full-icu
I found this example for Dockerizing a Node.js web app, which may help you.

Related

How to make my electron app install-able on Linux

Recently made build an application using Electron Framework. It is very basic. Now I have built it for Linux and published it to snap-store.
Now I want the application to be install-able by the apt-get command.
Is there any such way that I can do this?

NodeJS App Deployment via Azure DevOps 32bit issue

i am using Azure DevOps Build & Release to build my node.js react app that uses node-sass. So the Build is using the Node.js Tool Installer to specify the node.js version and then runs the npm install command. It all runs with a hosted agent that requires node.js and npm. The azure app service which runs the application is a default windows site.
After that i want to deploy it via Azure DevOps Release. I am using the Task "App Service Deploy" to deploy it. If i don't specify a deployment method it uses "Run from Package" and everything is fine. (Except that i cannot make changes in the root folder, but thats the concept of the run from package). If i change it to deploy via "Zip Deploy" i get the following error:
Error: Missing binding
D:\local\Temp\zipdeploy\extracted\node_modules\node-sass\vendor\win32-ia32-57\binding.node
Node Sass could not find a binding for your current environment:
Windows 32-bit with Node.js 8.x Found bindings for the following
environments: Windows 64-bit with Node.js 8.x
So i got this one already in my dev environment, but there i could get a simple workaround - install and use the 32bit version of node.js and then deploy it to azure (via VS Code extension). Now it is not possible to use 32bit nodejs in the Azure DevOps Build task as i saw as a limitation of the windows app services in azure.
How can i get Azure DevOps to use 32 bit when using npm install? Is the only possible way to switch to a linux app service (which runs 64bit) in azure?
Thanks!

Installing python on Azure App Service -- which tools can I use?

I created an App Service on Linux in Azure portal, hoping to use if as a managed Node.js server. A simple test app works but when coming to install bip32, or other web3 related packages I get the following error:
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
The obvious next step is to install Python, but the machine doesn't have any of the usual tools used for installing. No apt-get. No yum.
Any other options I could use for installing packages?
For your issue, you could have something misunderstand. The Azure Web App Service just allow you to manage your application, do not allow you to change the running environment in the Service Plan. For example, like that, you want to install tools such as apt and npm in it.
Azure provides some built-in runtime to Web App. Just like Node.js x, Python x, etc. You can choose an appropriate one to use. Even if there is no one suitable for you, you can make your application into a Docker image and create the Web App from it. Of curse, you should make sure your application can work well in the image and you can install the tools which you need. For more details, see Use a custom Docker image for Web App for Containers. Hope this will be helpful to you.

Node.js version and Google Cloud functions

I get this message when I start a local Firebase server with firebase serve:
Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
But there is no info about what to do. What do I need to do to downgrade Node.js to v6.11.5? Should I use that version just for Firebase projects and the latest released version of Node.js for other projects? In that case how to I do that?
EDIT: The warning now looks like this and I am unable to run a new nearly empty project:
Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
! functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory.
! functions: Error from emulator. mod.hasOwnProperty is not a function
So I really think I have to downgrande Node.js. But I do not know how to safely do that. Hm, looking at http://nodejs.org/ I can't even find version v6.11.5?
EDIT 2: Just checked in the new project if npm update --dev fixed the problem. It did not. (Actually no packages where updated.)
That's just a warning. You can ignore it if you know what you're doing. It's telling you that your local emulation of a function (running on node 8.9.4) may not perfectly match what the function will do when it's deployed to Cloud Functions (running 6.11.5). But as long as you're not using any features of node that are not available on node 6.11.5, you won't have a problem. I use newer versions of node to test locally all the time without problems.
You can uninstall and reinstall Cloud Functions emulator and Firebase Tools using the commands provided in the GitHub Troubleshooting guide. Since you are using Firebase, follow the instruction for the ‘Firebase Tools’.
Node v8 is now available for cloud functions:
https://firebase.googleblog.com/2018/08/cloud-functions-for-firebase-config-node-8-timeout-memory-region.html
So I believe this warning can truly be ignored...
There are several tools listed in the answers to this question
For Windows I just used nvmw successfully to accomplish this same task.
You will get the nvm here
After installation of nvm.
just use this command
"nvm install 8.9.1 64bit" you can use any version here or 64bit 32bit according to your system config
after that installation use
"nvm use 8.9.1"

Installing Nightmare.js on Heroku

My app needs installing nightmare.js which includes electron browser for web scraping. I followed this article https://medium.com/#johann.pardanaud/running-electron-on-heroku-db3866a690a3 but there are no results. So how can I install Nightmare.js with electon in it?
In this Nightmare Heroku Example project I include easy to follow step by step instructions about how to set up a Heroku app with Nightmare.

Resources