gpt4 book ai didi

node.js - Heroku - NodeJS 应用程序错误

转载 作者:太空宇宙 更新时间:2023-11-04 02:13:42 25 4
gpt4 key购买 nike

我通过 github 部署了该应用程序,一切顺利。但是当我打开网站时出现:

应用程序错误

An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

我的heroku日志:

2016-04-22T10:26:03.321608+00:00 heroku[slug-compiler]: Slug compilation finished
2016-04-22T10:26:03.321598+00:00 heroku[slug-compiler]: Slug compilation started
2016-04-22T10:26:04.121512+00:00 heroku[web.1]: State changed from crashed to starting
2016-04-22T10:26:13.903416+00:00 heroku[web.1]: Starting process with command `npm start`
2016-04-22T10:26:16.220624+00:00 app[web.1]:
2016-04-22T10:26:16.220639+00:00 app[web.1]: > Bustabit@2.0.0 start /app
2016-04-22T10:26:16.220641+00:00 app[web.1]: > node server/index
2016-04-22T10:26:16.220642+00:00 app[web.1]:
2016-04-22T10:26:16.646330+00:00 app[web.1]: fs.js:549
2016-04-22T10:26:16.646366+00:00 app[web.1]: return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
2016-04-22T10:26:16.646390+00:00 app[web.1]: ^
2016-04-22T10:26:16.646392+00:00 app[web.1]:
2016-04-22T10:26:16.646392+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/config/build-config.json'
2016-04-22T10:26:16.646393+00:00 app[web.1]: at Error (native)
2016-04-22T10:26:16.646394+00:00 app[web.1]: at Object.fs.openSync (fs.js:549:18)
2016-04-22T10:26:16.646394+00:00 app[web.1]: at Object.fs.readFileSync (fs.js:397:15)
2016-04-22T10:26:16.646395+00:00 app[web.1]: at Object.<anonymous> (/app/config/config.js:9:30)
2016-04-22T10:26:16.646395+00:00 app[web.1]: at Module._compile (module.js:409:26)
2016-04-22T10:26:16.646396+00:00 app[web.1]: at Object.Module._extensions..js (module.js:416:10)
2016-04-22T10:26:16.646396+00:00 app[web.1]: at Module.load (module.js:343:32)
2016-04-22T10:26:16.646397+00:00 app[web.1]: at Function.Module._load (module.js:300:12)
2016-04-22T10:26:16.646397+00:00 app[web.1]: at Module.require (module.js:353:17)
2016-04-22T10:26:16.646399+00:00 app[web.1]: at require (internal/module.js:12:17)
2016-04-22T10:26:16.654518+00:00 app[web.1]:

我知道有一个文件丢失。但它在哪个文件中调用丢失的文件呢?

2016-04-22T14:22:03.876529+00:00 app[web.1]: fs.js:549
2016-04-22T14:22:03.876540+00:00 app[web.1]: return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
2016-04-22T14:22:03.876563+00:00 app[web.1]: ^
2016-04-22T14:22:03.876567+00:00 app[web.1]: at Object.fs.readFileSync (fs.js:397:15)
2016-04-22T14:22:03.876568+00:00 app[web.1]: at Object.<anonymous> (/app/config/config.js:9:30)
2016-04-22T14:22:03.876604+00:00 app[web.1]: at Module.require (module.js:353:17)
2016-04-22T14:22:03.892638+00:00 app[web.1]: npm ERR! node v4.4.3
2016-04-22T14:22:03.894323+00:00 app[web.1]: npm ERR! not with npm itself.
2016-04-22T14:22:03.895519+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2016-04-22T14:22:03.324528+00:00 app[web.1]:

新错误。这次又发生什么事了?

最佳答案

看起来它从文件“/app/config/config.js”第 9 行抛出错误。

关于node.js - Heroku - NodeJS 应用程序错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36791844/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com