2020-01-28T20:45:52.134796+00:00 app[web.1]: npm ERR! Exit status 1
2020-01-28T20:45:52.134913+00:00 app[web.1]: npm ERR!
2020-01-28T20:45:52.135009+00:00 app[web.1]: npm ERR! Failed at the HyperApp-Starter-kit@4.0.1
start script.
2020-01-28T20:45:52.135096+00:00 app[web.1]: npm ERR! This is probably not a problem with npm.
There is likely additional logging output above.
2020-01-28T20:45:52.141867+00:00 app[web.1]:
2020-01-28T20:45:52.142006+00:00 app[web.1]: npm ERR! A complete log of this run can be found
in:
2020-01-28T20:45:52.142124+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-01-
28T20_45_52_135Z-debug.log
2020-01-28T20:45:52.198745+00:00 heroku[web.1]: Process exited with status 1
2020-01-28T20:46:00.048235+00:00 heroku[router]: at=error code=H10 desc="App crashed"
method=GET path="/" host=hyperrestaurant.herokuapp.com request_id=0427c1ab-3197-413b-bbe5-
4a39f3ba816a fwd="192.80.65.177" dyno= connect= service= status=503 bytes= protocol=https
2020-01-28T20:46:00.359976+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=hyperrestaurant.herokuapp.com request_id=2a514f7f-a533-4264-b18e-c7e147ec45b9 fwd="192.80.65.177" dyno= connect= service= status=503 bytes= protocol=https
我的包裹
{
"name": "HyperApp-Starter-kit",
"version": "4.0.1",
"description": "",
"main": "index.js ",
"scripts": {
"start": "node server.js",
"test": "jest",
"build": "gulp build",
"dev:webpack": "webpack --mode development --env.NODE_ENV=dev",
"build:webpack": "webpack --mode production --env.NODE_ENV=production",
"watch": "gulp",
"proxy": "gulp watch-proxy",
"static:dev": "gulp static-dev",
"static:build": "gulp static-dev",
"imgs": "gulp imagemin"
},
和我的server.js
const express = require('express')
const serveStatic = require('serve-static')
const path = require('path')
// create the express app
const app = express()
// create middleware to handle the serving the app
app.use("/", serveStatic ( path.join (__dirname, '/public')))
// serve index by default
app.get('/', function (req, res) {
res.sendFile(__dirname + '/public/index.html')
})
// Create default port to serve the app on
const port = process.env.PORT || 5000
app.listen(port)
// Log to feedback that this is actually running
console.log('Server started on port ' + port)