Node.js at=错误代码=H10 desc=";“应用程序崩溃”;在heroku上。我如何才能真正部署?如何解决问题?谢谢大家

Node.js at=错误代码=H10 desc=";“应用程序崩溃”;在heroku上。我如何才能真正部署?如何解决问题?谢谢大家,node.js,heroku,webpack,Node.js,Heroku,Webpack,2021-02-04T21:14:34.888815+00:00应用程序[web.1]:at模块编译(internal/modules/cjs/loader.js:1156:30) 2021-02-04T21:14:34.888815+00:00应用程序[web.1]:at Object.Module._extensions..js(internal/modules/cjs/loader.js:1176:10) 2021-02-04T21:14:34.888815+00:00应用程序[web.1

2021-02-04T21:14:34.888815+00:00应用程序[web.1]:at模块编译(internal/modules/cjs/loader.js:1156:30) 2021-02-04T21:14:34.888815+00:00应用程序[web.1]:at Object.Module._extensions..js(internal/modules/cjs/loader.js:1176:10) 2021-02-04T21:14:34.888815+00:00应用程序[web.1]:at Module.load(内部/modules/cjs/loader.js:1000:32) 2021-02-04T21:14:34.888816+00:00应用程序[web.1]:at Function.Module.\u load(内部/modules/cjs/loader.js:899:14) 2021-02-04T21:14:34.888816+00:00应用程序[web.1]:位于Function.executeUserEntryPoint[作为runMain](内部/modules/run_main.js:74:12){ 2021-02-04T21:14:34.888816+00:00应用程序[web.1]:代码:“未找到模块”, 2021-02-04T21:14:34.888817+00:00应用程序[web.1]:requireStack:['/app/server.js'] 2021-02-04T21:14:34.888817+00:00应用程序[web.1]:} 2021-02-04T21:14:34.939405+00:00 heroku[web.1]:进程已退出,状态为1 2021-02-04T21:14:34.986938+00:00 heroku[web.1]:状态从开始更改为崩溃 2021-02-04T21:15:03.000000+00:00应用程序[api]:由用户启动生成 2021-02-04T21:20:20.449954+00:00应用程序[api]:按用户部署21abf2c8 2021-02-04T21:20:20.449954+00:00应用程序[api]:由用户创建的版本v7 2021-02-04T21:20:21.611307+00:00 heroku[web.1]:状态从崩溃更改为启动 2021-02-04T21:20:27.675645+00:00 heroku[web.1]:使用命令
node server.js启动进程
2021-02-04T21:20:30.295117+00:00应用程序[web.1]:节点:内部/模块/cjs/加载程序:928
2021-02-04T21:20:30.295138+00:00应用程序[web.1]:抛出错误;
2021-02-04T21:20:30.295138+00:00应用程序[web.1]:^
2021-02-04T21:20:30.295138+00:00应用程序[web.1]:
2021-02-04T21:20:30.295139+00:00应用程序[web.1]:错误:找不到模块“webpack”
2021-02-04T21:20:30.295139+00:00应用程序[web.1]:需要堆栈:
2021-02-04T21:20:30.295139+00:00应用程序[web.1]:-/app/server.js
2021-02-04T21:20:30.295140+00:00应用程序[web.1]:位于Function.Module.\u resolveFilename(节点:internal/modules/cjs/loader:925:15)
2021-02-04T21:20:30.295141+00:00应用程序[web.1]:at功能模块加载(节点:内部/模块/cjs/加载程序:769:27)
2021-02-04T21:20:30.295141+00:00应用程序[web.1]:at Module.require(节点:internal/modules/cjs/loader:997:19)
2021-02-04T21:20:30.295141+00:00应用程序[web.1]:根据需要(节点:内部/模块/cjs/helpers:92:18)
2021-02-04T21:20:30.295142+00:00应用程序[web.1]:at对象。(/app/server.js:3:17)
2021-02-04T21:20:30.295142+00:00应用程序[web.1]:at模块编译(节点:internal/modules/cjs/loader:1108:14)
2021-02-04T21:20:30.295142+00:00应用程序[web.1]:at Object.Module._extensions..js(节点:internal/modules/cjs/loader:1137:10)2021-02-04T21:20:30.295143+00:00应用程序[web.1]:at Module.load(节点:internal/modules/cjs/loader:973:32)
2021-02-04T21:20:30.295143+00:00应用程序[web.1]:at功能模块加载(节点:内部/模块/cjs/加载程序:813:14)
2021-02-04T21:20:30.295143+00:00应用程序[web.1]:在Function.executeUserEntryPoint[作为运行主节点](节点:内部/模块/运行主节点:76:12){
2021-02-04T21:20:30.295143+00:00应用程序[web.1]:代码:“未找到模块”,
2021-02-04T21:20:30.295144+00:00应用程序[web.1]:requireStack:['/app/server.js']
2021-02-04T21:20:30.295144+00:00应用程序[web.1]:}
2021-02-04T21:20:30.345918+00:00 heroku[web.1]:进程已退出,状态为1
2021-02-04T21:20:30.384592+00:00 heroku[web.1]:状态从开始更改为崩溃
2021-02-04T21:20:34.000000+00:00应用程序[api]:构建成功
2021-02-04T21:21:02.683135+00:00 heroku[路由器]:at=错误代码=H10 desc=“App crash”方法=GET path=“/”主机=ibeggg.herokuapp.com请求\u id=d281c400-d1b2-43fd-810b-b5d050ea7e11 fwd=“88.229.116.225”dyno=connect=service=status=503 bytes=protocol=https
2021-02-04T21:21:02.994155+00:00 heroku[路由器]:at=错误代码=H10 desc=“应用程序崩溃”方法=GET path=“/favicon.ico”主机=ibeggg.herokuapp.com请求\u id=3a6125c6-23f7-4c18-8de7-f00a7bd86abb fwd=“88.229.116.225”dyno=connect=service=status=503字节=https
2021-02-04T21:28:25.252658+00:00应用程序[api]:用户使用命令
printenv
启动流程 2021-02-04T21:28:31.185921+00:00 heroku[run.7047]:等待客户 2021-02-04T21:28:31.198973+00:00 heroku[run.7047]:状态从启动更改为启动 2021-02-04T21:28:31.470030+00:00 heroku[run.7047]:使用命令
printenv启动进程
2021-02-04T21:28:35.582815+00:00 heroku[运行.7047]:进程已退出,状态为0
2021-02-04T21:28:35.613815+00:00 heroku[run.7047]:状态从up更改为complete
2021-02-04T21:37:37.000000+00:00应用程序[api]:由用户启动生成
2021-02-04T21:42:37.645366+00:00应用程序[api]:按用户部署33855d7b
2021-02-04T21:42:37.645366+00:00应用程序[api]:由用户创建的v8版本
2021-02-04T21:42:39.338912+00:00 heroku[web.1]:状态从崩溃更改为启动
2021-02-04T21:42:46.215776+00:00 heroku[web.1]:使用命令
node server.js启动进程
2021-02-04T21:42:48.281568+00:00应用程序[web.1]:节点:内部/模块/cjs/加载程序:928
2021-02-04T21:42:48.281609+00:00应用程序[web.1]:抛出错误;
2021-02-04T21:42:48.281610+00:00应用程序[web.1]:^
2021-02-04T21:42:48.281610+00:00应用程序[web.1]:
2021-02-04T21:42:48.281611+00:00应用程序[web.1]:错误:找不到模块“express”
2021-02-04T21:42:48.281611+00:00应用程序[web.1]:需要堆栈:
2021-02-04T21:42:48.281616+00:00应用程序[web.1]:-/app/server.js
2021-02-04T21:42:48.281620+00:00应用程序[web.1]:位于Function.Module.\u resolveFilename(节点:internal/modules/cjs/loader:925:15)
2021-02-04T21:42:48.281625+00:00应用程序[web.1]:at功能模块加载(节点:内部/模块/cjs/加载程序:769:27)
2021-02-04T21:42:48.281633+00:00应用程序[web.1]:at Module.require(节点:internal/modules/cjs/loader:997:19)
2021-02-04T21:42:48.281634+00:00应用程序[web.1]:根据需要(节点:内部/模块/cjs/helpers:92:18)
2021-02-04T21:42:48.281634+00:00应用程序[web.1]:at对象。(/app/server.js:2:17)
2021-02-04T21:42:48.281634+00:00应用程序[web.1]:at模块编译(节点:internal/modules/cjs/loader:1108:14)
2021-02-04T21:42:48.281635+00:00应用程序[web.1]:at Object.modules.\u extensions..js(节点:internal/modules/cjs/lo
My package.json:
{
  "name": "chat-web-sdk-react-sample",
  "private": true,
  "version": "0.0.1",
  "description": "Zopim Web SDK Sample App (React)",
  "main": "server.js",
  "scripts": {
    "clean": "rimraf dist/*",
    "copy": "copyfiles -f ./src/index.html ./dist",
    "dist": "npm run copy & webpack --env=dist",
    "lint": "eslint ./src",
    "posttest": "npm run lint",
    "serve": "node server.js --env=dev",
    "serve:dist": "node server.js --env=dist",
    "start": "node server.js --env=dev",
    "storybook": "start-storybook -p 6006",
    "build-storybook": "build-storybook"
  },
  "keywords": [],
  "author": "Zendesk",
  "engineStrict": true,
  "engines": {
    "node": ">=4.5.0"
  },
  "devDependencies": {
    "@storybook/addon-actions": "^6.1.14",
    "@storybook/addon-essentials": "^6.1.14",
    "@storybook/addon-links": "^6.1.14",
    "@storybook/react": "^6.1.14",
    "@zendeskgarden/tailwindcss": "^1.1.0",
    "autoprefixer": "^6.4.0",
    "babel-core": "^6.0.0",
    "babel-eslint": "^6.0.0",
    "babel-loader": "^6.0.0",
    "babel-plugin-transform-class-properties": "^6.11.5",
    "babel-plugin-transform-object-rest-spread": "^6.8.0",
    "babel-polyfill": "^6.3.14",
    "babel-preset-es2015": "^6.0.15",
    "babel-preset-react": "^6.0.15",
    "bower-webpack-plugin": "^0.1.9",
    "copyfiles": "^0.2.1",
    "css-loader": "^0.23.0",
    "eslint": "^2.2.0",
    "eslint-loader": "^1.0.0",
    "eslint-plugin-react": "^5.0.0",
    "file-loader": "^0.8.4",
    "glob": "^7.0.0",
    "minimist": "^1.2.0",
    "node-sass": "^4.13.1",
    "null-loader": "^0.1.1",
    "open": "0.0.5",
    "postcss": "^5.0.11",
    "postcss-loader": "^0.8.0",
    "react-addons-test-utils": "^15.0.0",
    "react-hot-loader": "^1.2.9",
    "rimraf": "^2.4.3",
    "sass-loader": "^3.1.2",
    "style-loader": "^0.13.0",
    "url-loader": "^0.5.6",
    "webpack": "^1.12.0",
    "webpack-dev-server": "^1.12.0"
  },
  "dependencies": {
    "@babel/polyfill": "^7.6.0",
    "@zendeskgarden/container-modal": "^0.8.5",
    "@zendeskgarden/container-schedule": "^1.3.7",
    "@zendeskgarden/css-variables": "^6.4.5",
    "@zendeskgarden/react-accordions": "^8.30.0",
    "@zendeskgarden/react-theming": "^8.30.0",
    "@zendeskgarden/svg-icons": "^6.27.0",
    "classnames": "^2.2.5",
    "collections": "^2.0.3",
    "core-js": "^3.8.3",
    "graphql": "^15.4.0",
    "lodash": "^4.15.0",
    "prop-types": "^15.7.2",
    "react": "^15.7.0",
    "react-addons-css-transition-group": "^15.3.1",
    "react-dom": "^15.7.0",
    "react-redux": "^4.4.5",
    "redux": "^3.5.2",
    "store": "^1.3.20",
    "storybook-host": "^5.2.0",
    "styled-components": "^5.2.1",
    "tailwindcss": "^1.2.0",
    "websocket": "^1.0.33",
    "wss": "^3.3.4"
  },
  "license": "ISC"
}

my server.js :
'use strict';
const express = require('express');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('./webpack.config');
const app = express();
const open = require('open');
const ip_address = '127.0.0.1';
const PORT = process.env.PORT;

new WebpackDevServer(webpack(config), config.devServer)
.listen(process.env.PORT , ip_address, (err) => {
  if (err) {
    console.log(err);
  }
  console.log(__dirname);
//=> '/Users/sindresorhus/rainbow'
 
console.log(process.cwd());
//=> '/Users/sindresorhus/unicorn'

//=> '/Users/sindresorhus/unicorn/foo.js'
  console.log(`Listening at ${ip_address}:${process.env.PORT}`);
  console.log('Opening your system browser...');
  open(`http://${ip_address}:${process.env.PORT}/webpack-dev-server/`);
});
npm i --save express webpack webpack-dev-server