Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 为什么我在Heroku nodejs主机中出现这个错误?_Node.js_Heroku_Hosting - Fatal编程技术网

Node.js 为什么我在Heroku nodejs主机中出现这个错误?

Node.js 为什么我在Heroku nodejs主机中出现这个错误?,node.js,heroku,hosting,Node.js,Heroku,Hosting,我与heroku托管idk有问题我能做什么。(端口可能正确:const port=process.env.port | |) production.json可能有错误,请检查它是否是有效的json代码您可能不应该在生产环境中运行ts node dev;运行编译后的代码。但我们可以告诉你的是,你的配置文件格式不正确,如果你想得到更多帮助,请提供一个。 2020-09-07T20:45:20.640779+00:00 heroku[web.1]: State changed from crashed

我与heroku托管idk有问题我能做什么。(端口可能正确:const port=process.env.port | |)


production.json可能有错误,请检查它是否是有效的json代码

您可能不应该在生产环境中运行ts node dev;运行编译后的代码。但我们可以告诉你的是,你的配置文件格式不正确,如果你想得到更多帮助,请提供一个。
2020-09-07T20:45:20.640779+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-07T20:45:20.304911+00:00 app[api]: Deploy d8237452 by user maurerkrisztian@gmail.com
2020-09-07T20:45:20.304911+00:00 app[api]: Release v7 created by user maurerkrisztian@gmail.com
2020-09-07T20:45:20.000000+00:00 app[api]: Build succeeded
2020-09-07T20:45:25.983410+00:00 heroku[web.1]: Starting process with command `npm start`
2020-09-07T20:45:28.650802+00:00 app[web.1]:
2020-09-07T20:45:28.650814+00:00 app[web.1]: > simple-rest-api@1.0.0 start /app
2020-09-07T20:45:28.650814+00:00 app[web.1]: > ts-node-dev app.ts
2020-09-07T20:45:28.650814+00:00 app[web.1]:
2020-09-07T20:45:29.326452+00:00 app[web.1]: ts-node-dev ver. 1.0.0-pre.58 (using ts-node ver. 8.10.2, typescript ver. 3.9.7)
2020-09-07T20:45:39.103732+00:00 app[web.1]: [ERROR] 20:45:39 Error: Cannot parse config file: '/app/config/production.json': SyntaxError: Unexpected end of JSON input
2020-09-07T20:46:26.541466+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-09-07T20:46:26.561313+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-09-07T20:46:26.665093+00:00 heroku[web.1]: Process exited with status 137
2020-09-07T20:46:26.718342+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-07T20:46:28.765964+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/api/echo" host=anime-stream-api.herokuapp.com request_id=d2794c21-f597-44e0-86f8-d6df00c2fac1 fwd="84.236.68.164" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T20:46:30.035002+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=anime-stream-api.herokuapp.com request_id=2a36961c-812a-412c-acb3-13b01d962394 fwd="84.236.68.164" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T20:46:34.664255+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/api/echo" host=anime-stream-api.herokuapp.com request_id=1b02724a-887e-4881-8fde-2e025fc6ed1c fwd="84.236.68.164" dyno= connect= service= status=503 bytes= protocol=https