0

I'm trying to push lightning web component to heroku platform. I'm getting this error.

I have used heroku commands -- heroku logs --tail

019-11-01T05:12:16.37014+00:00 heroku[web.1]: State changed from crashed to starting

2019-11-01T05:12:24.922757+00:00 heroku[web.1]: Starting process with command `npm start

2019-11-01T05:12:27.40878+00:00 heroku[web.1]: State changed from starting to crashed

2019-11-01T05:12:27.369911+00:00 heroku[web.1]: Process exited with status 1 2019-11-01T05:12:27.317819+00:00 app[web.1]: npm ERR! missing script: start

2019-11-01T05:12:27.326463+00:00 app[web.1]:

2019-11-01T05:12:27.326928+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:

2019-11-01T05:12:27.327102+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-11-01T05_12_27_318Z-debug.log 2019-11-01T05:12:36.474076+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=macabre-fangs-30358.herokuapp.com request_id=399a91da-8fe6-4b4c-b4b8-a8cdb2dc23c4 fwd="106.51.66.44" dyno= connect= service= status=503 bytes= protocol=https

2019-11-01T05:12:37.251927+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=macabre-fangs-30358.herokuapp.com request_id=e675871a-8687-47a9-8a62-2f18d05c87f2 fwd="106.51.66.44" dyno= connect= service= status=503 bytes= protocol=https

I have also tried repush(git push heroku master) the code to the heroku and tried refresh or restart(heroku restart) the error code. but it's not solving this issue.

I have one ProcFile -- web: npm run serve

And i have this file also

EXPRESS-Dev.js

const path = require('path'); const express = require('express');

const customServer = require(path.resolve('./src/server/'));

const app = express();

customServer(app);

app.listen(3002, () => { // eslint-disable-next-line no-console console.log('Yay, local server started'); });

1 Answer 1

1

i think we need to change the procfile slightly an i have installed yarn. that could be the case also.

so change the procfile file

from web: npm run serve

to

web: npm start

and add one line in package.json

under:

Script{
"serve": "lwc-services serve",

//for above line,  when you build the app on heroku it was looking at this script. so i just kept that as it is and added below line.

//also read this doc also for refernce [https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type][1]

//add this line to package.json

"start": "lwc-services serve"

{

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .