I get failed to start application for an agnular app. What can I do?

HI all,

I have this fairly rudimentary angular app https://glitch.com/edit/#!/andreicristianpetcu-ngcli but it does not work. I get this error:

failed to start application on andreicristianpetcu-ngcli.glitch.me
This is most likely because your project has a code error.
Check your project logs, fix the error and try again.

Nothing in the logs. What am I doing wrong?

Thank you!

Hi :slight_smile:

I was able to make at least the app start by changing line 6 of package.json to

"start": "ng serve --port 3000",

Glitch recognizes that an app is running by looking at a few different ports. The default ng serve port (4200) is not among those. The --port flag allows you to pick another one :slight_smile:

1 Like

Thank you! This helped. I still get an error but it is a different one. Usually a different error === progress :slight_smile:

for posterity

  "scripts": {
    "ng": "ng",
    "start": "ng serve --port 3000 --host --disable-host-check",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"

Now it works.

1 Like

For more posterity "start": "ng serve --host --public-host https://$PROJECT_DOMAIN.glitch.me" works without disabling the host check.

1 Like