Dom
Dom

Reputation: 3444

Problem to deploy a vue application in heroku

I am trying to deploy a vue application in heroku system. I have understood that I need to add a "script" section in my package.json. My section is :

"scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "heroku-postbuild": "npm install && npm run build",
    },

I have no error for the build. But when I launch the application, I have this error:

enter image description here

And when I see the log :

heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=XXXXXXXX.herokuapp.com request_id=f81def0f-a2d0-4e1e-889a-640432071f5d fwd="92.148.12.118" dyno= connect= service= status=503 bytes= protocol=https

Certainly it is not the correct command to put in this section. I tried a lot of things without success. What must be this command in this package.json ?

Note : When I develop, I launch the appli whith npm run serve. And all is running fine.

Upvotes: 1

Views: 677

Answers (2)

Dom
Dom

Reputation: 3444

I finally managed to get my vue.js app to work on heroku.

thanks to this topic :

https://dev.to/marwan01/deploy-a-vue-js-app-to-heroku-30m

Upvotes: 1

Armando
Armando

Reputation: 11

I suggest you try NetliFy it's easy and fast!

Upvotes: 0

Related Questions