我正在使用节点js和heroku。
当我在本地运行我的应用
时heroku本地网
应用RUN:
添加更改时:
git commit -m"测试" [主警告:LF将被app.js中的CRLF取代。 该文件将在您的工作目录中具有其原始行结尾。 548cb61]测试 警告:LF将由app.js中的CRLF替换。 该文件将在您的工作目录中具有其原始行结尾。 1个文件已更改,1个插入(+),1个删除( - )
但是当我尝试使用云时:
2018-06-10T15:28:33.340877 + 00:00 app [web.1]:npm ERR!
/app/.npm/_logs/2018-06-10T15_28_33_335Z-debug.log 2018-06-10T15:28:33.427366 + 00:00 heroku [web.1]:州改变自 开始崩溃2018-06-10T15:35:34.000000 + 00:00 app [api]:Build 用户daniel72584@gmail.com 2018-06-10T15:36:02.027898 + 00:00开始 app [api]:用户daniel72584@gmail.com部署548cb610 2018-06-10T15:36:02.027898 + 00:00 app [api]:发布用户创建的v8 daniel72584@gmail.com 2018-06-10T15:36:02.226550 + 00:00 heroku [web.1]: 国家从崩溃变为开始 2018-06-10T15:36:02.000000 + 00:00 app [api]:构建成功 2018-06-10T15:36:07.902565 + 00:00 heroku [web.1]:启动过程 命令npm start
2018-06-10T15:36:09.872724 + 00:00 app [web.1]: 2018-06-10T15:36:09.872748 + 00:00 app [web.1]:> apimonitora@0.0.0开始 / app 2018-06-10T15:36:09.872749 + 00:00 app [web.1]:>节点./bin/www 2018-06-10T15:36:09.872751 + 00:00 app [web.1]: 2018-06-10T15:36:09.949333 + 00:00 app [web.1]:module.js:549 2018-06-10T15:36:09.949335 + 00:00 app [web.1]:throw err; 2018-06-10T15:36:09.949336 + 00:00 app [web.1]:^ 2018-06-10T15:36:09.949337 + 00:00 app [web.1]: 2018-06-10T15:36:09.949339 + 00:00 app [web.1]:错误:找不到模块 ' ./数据库/ initdb的' 2018-06-10T15:36:09.949340 + 00:00 app [web.1]:
在Function.Module._resolveFilename(module.js:547:15) 2018-06-10T15:36:09.949341 + 00:00 app [web.1]:at Function.Module._load(module.js:474:25) 2018-06-10T15:36:09.949342 + 00:00 app [web.1]:在Module.require (module.js:596:17)2018-06-10T15:36:09.949345 + 00:00 app [web.1]:at require(internal / module.js:11:18)2018-06-10T15:36:09.949346 + 00:00 app [web.1]:at Object。 (/app/app.js:7:16) 2018-06-10T15:36:09.949348 + 00:00 app [web.1]:在Module._compile (module.js:652:30)2018-06-10T15:36:09.949350 + 00:00 app [web.1]:at Object.Module._extensions..js(module.js:663:10) 2018-06-10T15:36:09.949351 + 00:00 app [web.1]:在Module.load (module.js:565:32)2018-06-10T15:36:09.949353 + 00:00 app [web.1]:at tryModuleLoad(module.js:505:12)2018-06-10T15:36:09.949355 + 00:00 app [web.1]:在Function.Module._load(module.js:497:3) 2018-06-10T15:36:09.956578 + 00:00 app [web.1]:npm ERR!代码ELIFECYCLE 2018-06-10T15:36:09.957148 + 00:00 app [web.1]:npm ERR!错误1 2018-06-10T15:36:09.958570 + 00:00 app [web.1]:npm ERR! apimonitora@0.0.0 start:node ./bin/www
2018-06-10T15:36:09.958676 + 00:00 app [web.1]:npm ERR!退出状态1 2018-06-10T15:36:09.959076 + 00:00 app [web.1]:npm ERR! 2018-06-10T15:36:09.959332 + 00:00 app [web.1]:npm ERR!失败了 apimonitora@0.0.0启动脚本。 2018-06-10T15:36:09.959526 + 00:00 app [web.1]:npm ERR!这可能不是npm的问题。有 可能是上面的额外日志输出 2018-06-10T15:36:09.966360 + 00:00 app [web.1]: 2018-06-10T15:36:09.966494 + 00:00 app [web.1]:npm ERR!一个完整的日志 这个运行可以在:2018-06-10T15:36:09.966626 + 00:00找到 app [web.1]:npm ERR!
/app/.npm/_logs/2018-06-10T15_36_09_960Z-debug.log 2018-06-10T15:36:10.035659 + 00:00 heroku [web.1]:州改变自 开始崩溃2018-06-10T15:36:10.041553 + 00:00 heroku [web.1]: 国家从崩溃变为开始 2018-06-10T15:36:10.019724 + 00:00 heroku [web.1]:进程退出 状态1 2018-06-10T15:36:16.546813 + 00:00 heroku [web.1]:开始 使用命令npm start
2018-06-10T15:36:19.460553 + 00:00进行处理 app [web.1]:2018-06-10T15:36:19.460585 + 00:00 app [web.1]:> apimonitora@0.0.0 start / app 2018-06-10T15:36:19.460587 + 00:00 app [web.1]:>节点./bin/www 2018-06-10T15:36:19.460589 + 00:00 app [web.1]:2018-06-10T15:36:19.779696 + 00:00 app [web.1]: module.js:549 2018-06-10T15:36:19.779721 + 00:00 app [web.1]:throw 呃; 2018-06-10T15:36:19.779722 + 00:00 app [web.1]:^ 2018-06-10T15:36:19.779724 + 00:00 app [web.1]: 2018-06-10T15:36:19.779727 + 00:00 app [web.1]:错误:找不到模块 ' ./数据库/ initdb的' 2018-06-10T15:36:19.779730 + 00:00 app [web.1]:
在Function.Module._resolveFilename(module.js:547:15) 2018-06-10T15:36:19.779731 + 00:00 app [web.1]:at Function.Module._load(module.js:474:25) 2018-06-10T15:36:19.779732 + 00:00 app [web.1]:在Module.require (module.js:596:17)2018-06-10T15:36:19.779734 + 00:00 app [web.1]:at require(internal / module.js:11:18)2018-06-10T15:36:19.779735 + 00:00 app [web.1]:at Object。 (/app/app.js:7:16) 2018-06-10T15:36:19.779737 + 00:00 app [web.1]:在Module._compile (module.js:652:30)2018-06-10T15:36:19.779738 + 00:00 app [web.1]:at Object.Module._extensions..js(module.js:663:10) 2018-06-10T15:36:19.779739 + 00:00 app [web.1]:在Module.load (module.js:565:32)2018-06-10T15:36:19.779741 + 00:00 app [web.1]:at tryModuleLoad(module.js:505:12)2018-06-10T15:36:19.779742 + 00:00 app [web.1]:在Function.Module._load(module.js:497:3) 2018-06-10T15:36:19.815001 + 00:00 app [web.1]:npm ERR!代码ELIFECYCLE 2018-06-10T15:36:19.815859 + 00:00 app [web.1]:npm ERR!错误1 2018-06-10T15:36:19.820597 + 00:00 app [web.1]:npm ERR! apimonitora@0.0.0 start:node ./bin/www
2018-06-10T15:36:19.822792 + 00:00 app [web.1]:npm ERR!退出状态1 2018-06-10T15:36:19.822802 + 00:00 app [web.1]:npm ERR! 2018-06-10T15:36:19.825820 + 00:00 app [web.1]:npm ERR!失败了 apimonitora@0.0.0启动脚本。 2018-06-10T15:36:19.825828 + 00:00 app [web.1]:npm ERR!这可能不是npm的问题。有 可能是上面的额外日志输出 2018-06-10T15:36:19.843973 + 00:00 app [web.1]: 2018-06-10T15:36:19.844480 + 00:00 app [web.1]:npm ERR!一个完整的日志 该运行可以在:2018-06-10T15:36:19.844834 + 00:00中找到 app [web.1]:npm ERR!
/app/.npm/_logs/2018-06-10T15_36_19_827Z-debug.log
我的代码位于https://github.com/ALAxHxC/APIMonitora
知道我做错了什么。我的环境是Windows 10。