How to deploy Angular 4 web application to Google Cloud Platform?
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] question
Versions.
@angular/cli: 1.0.2 node: 6.9.2 os: linux x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @angular/core: 4.1.3 @angular/forms: 4.1.3 @angular/http: 4.1.3 @angular/platform-browser: 4.1.3 @angular/platform-browser-dynamic: 4.1.3 @angular/router: 4.1.3 @angular/cli: 1.0.2 @angular/compiler-cli: 4.1.3
Repro steps.
I followed the steps in this article Build a web app using Google Cloud Platform, but I met some problems when I ran this command to deploy the web app.
gcloud app deploy --version v1
The error shows ‘ng not found’. How can I deal with it? Should I change the npm start command? Or build my own docker file and push to Google Cloud? I have node and npm installed(both meet requirement), as well as angular/cli.
The log given by the failure.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
> loklak-message-publisher@0.0.0 start /app
> ng serve
sh: 1: ng: not found
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/nodejs/bin/node" "/nodejs/bin/npm" "start"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! loklak-message-publisher@0.0.0 start: `ng serve`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the loklak-message-publisher@0.0.0 start script 'ng serve'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the loklak-message-publisher package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs loklak-message-publisher
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls loklak-message-publisher
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
App Engine deployment with Angular, Nginx, Docker, and ...
This tutorial shows you how to deploy a sample Angular application to App Engine using the gcloud command-line tool.
Read more >How to Deploy Angular Application on Google Cloud Run
Use image from NodeJS - version 17- minimal version; Install the Angular CLI; Expose the port 4200 as in our index.js file; Run...
Read more >How To Deploy an Angular App on Google Cloud
Go to your Google Cloud console and be sure you have opened the project where Cloud Run has your service in it. Go...
Read more >How to Deploy Angular 8 App to Google App Engine - Digizoo
Cloud Build Options · In the build environment, install all the NPM dependencies defined in the package.json · Using the Angular Cloud Builder...
Read more >Setup and Deploy Angular app to Google Cloud Run
First thing you need to do is go to the Google Cloud Console and create a Cloud Run service. When on the Cloud...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Docker is awesome. If you don’t happen to be using Docker, this link provides one deployment solution to vanilla App Engine, and although slightly dated, I have used it successfully with Angular 5.1.6. Interestingly, it uses the Python runtime. HTH
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.