Tag: heroku

无法在本地启动heroku

是否有人知道当我尝试在本地启动heroku时(我在本地编写Heroku后出现此错误)时出现此错误: [WARN] No ENV file found 15:23:12 worker.1 | C:\Users\Marija\Documents\Projects\project\node_modules\natural\lib\natural\brill_pos_tagger\lib \Brill_POS_Tagger.js:26 15:23:12 worker.1 | logger.setLevel('WARN'); 15:23:12 worker.1 | ^ 15:23:12 worker.1 | TypeError: logger.setLevel is not a function 15:23:12 worker.1 | at Object.<anonymous> (C:\Users\Marija\Documents\Projects\project\node_modules\natural\lib \natural\brill_pos_tagger\lib\Brill_POS_Tagger.js:26:8) 15:23:12 worker.1 | at Module._compile (module.js:570:32) 15:23:12 worker.1 | at Object.Module._extensions..js (module.js:579:10) 15:23:12 worker.1 | at Module.load (module.js:487:32) 15:23:12 worker.1 […]

如何将MongoDB连接到Mongoose上的Heroku?

为什么当我尝试将MongoDB连接到Mongoose上的Heroku(在我的node.js应用程序中),如文档中所写(使用: `var uri = 'mongodb://dbuser:dbpass@host:port/dbname'; mongoose.connect(uri);` )errorlog为我提供了使用using MongoClient.connect with auth credentials. ? 有人请在2017年解释如何在node.js上连接MogoDB到Heroku! 我的应用程序( git )和错误日志: errorlog

Heroku node.js应用程序与buildpack不兼容

我今天尝试上传我的不和机器人heroku,但每次我使用git push heroku master它会给我以下错误: remote: Compressing source files… done. remote: Building source: remote: remote: —–> App not compatible with buildpack: https://codon- buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tg remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure remote: remote: ! Push failed remote: Verifying deploy… remote: remote: ! Push rejected to sjak-bot. remote: To https://git.heroku.com/sjak-bot.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed […]

节点Js应用程序正在运行,并停止使用SIGTERM Process的所有进程,状态为143

我的节点js应用程序进程正常工作,突然停止工作,并与Sigterm错误出错。 我试图扩展到标准的1xtypes,并增加了网页的dynamic尺寸。 但是我仍然得到同样的错误。 请帮忙 2017-10-16T19:53:23.268194+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2017-10-16T19:53:23.381317+00:00 heroku[web.1]: Process exited with status 143 2017-10-16T19:53:24.683700+00:00 heroku[web.1]: Starting process with command `node index.js` 2017-10-16T19:53:28.917250+00:00 app[web.1]: Running on port 39434 2017-10-16T19:53:29.043431+00:00 heroku[web.1]: State changed from starting to up 码 // call the packages we need var express = require('express'); // call express var […]

错误部署我的节点JS应用程序到Heroku

我的代码在本地运行良好,但是当我在heroku上运行时,发现错误: at = error code = H10 desc =“App crashed”method = GET path =“/”host = mystrelle.herokuapp.com request_id = 5874d970-4178-4f51-ad38-62d510d8a047 fwd =“197.211.56.97”dyno = connect = service =状态= 503字节=协议= https var skype = require('botbuilder'); var express = require('express'); var app = express(); var botService = new skype.ChatConnector({ appId: 'da026eab-b762-4ff6-9f01-191d70e37437', appPassword: 'xxxxxxxxxxxxxxxxxxxx' //// i hid the pass }); […]

微服务每分钟处理100个请求

我有node.js应用程序应该处理以下 获取压缩文件提取这些文件(JS模块文件与一些关键和价值 – 最多20个文件,但通常是5-8个文件为每个请求) 对这些文件进行一些分析并从中创build新文件并将其发回客户端(如果请求是5个文件,分析应该返回相同的5个新文件等) 压缩这个新文件并将其发送回客户端 我创build了可以正常工作的分析模块,对于大约10个文件,大约需要250-300毫秒来进行分析并创build新文件。 让我们假设我需要服务100个客户,可以做到这一点 现在我想创build一些stateless微服务,这个function基本上就是这样做的 get zip extract zip manipulate zip send files 为此,我想在云中创build一个micro service (无状态)(我想将其部署到应该处理它的云(云代工/ Heroku)而我的问题在于如何处理多个请求?每分钟100的请求…我明白,应该是asynchronous工作,但我仍然恐怕10或更多的要求我的应用程序将粉碎… … – 队列? 缩放?

使用forever命令在heroku上运行node.js脚本

所以,我在这里问了很多,因为我找不到一个与这个小问题有关的答案。 我想在自由层上的我的heroku服务器上运行node.js文件,但是我不想使用node file.js 我想forever start file.js使用forever start file.js 所以,我在我的包文件中编写了这些命令,并为worker: forever start file.js定义了一个Procfile worker: forever start file.js file.js。 并部署到heroku,但所有的日志说forever: bash command not found 。 任何解决scheme

在heroku中将应用从一种语言更改为另一种语言

是否有可能从一种语言切换雪松堆栈上的Heroku应用程序? 在这个特定的实例中,我试图将应用程序从PHP迁移到NodeJS,在执行git push之后,NodeJS将其作为NodeJS应用程序检测到: —–> Heroku receiving push —–> Node.js app detected —–> Fetching Node.js binaries —–> Vendoring node 0.4.7 —–> Installing dependencies with npm 1.0.94 Dependencies installed —–> Discovering process types Procfile declares types -> web —–> Compiled slug size is 5.0MB —–> Launching… done, v7 然而它然后崩溃: Error: No such file or directory – node […]

用Node.js在Heroku上使用Socket.io和Redis

我试图用Redis的Node.js和Socket.io部署一个应用程序到Heroku。 我已经设置了Socket.io来使用Heroku指定的 XHR长轮询,如果我只有一个dyno,它就可以完美工作,但是当我使用多个dynos时,它不起作用。 最初,我在Socket.io中使用了一个MemoryStore,当我使用“heroku ps:scale web = 2”来扩展它时,它开始间歇性地工作,并在客户端给出这个错误: Uncaught TypeError:对象#<Transport>的属性'open'不是一个函数 我在Socket.io文档中发现: “如果要扩展到多个进程和/或多个服务器,可以使用我们的RedisStore,它使用Redis NoSQL数据库作为中间人” 所以,我创build了一个RedisStore: var newRedisStore = new RedisStore({ redisPub : pub, redisSub : sub, redisClient : client }); 并configuration了Socket.io来使用它: //set up Web Socket Server io.configure(function () { io.set("transports", ["xhr-polling"]); io.set("polling duration", 10); io.set('store', newRedisStore); }); 而且这一切都完美地在本地,并与Heroku一个networkingdynamic。 但是,只要我把它扩展到多个进程,就会间歇性地开始不再工作,尽pipe现在我不会再犯这个错误了。 所以,我不确定该从哪里出发。 这些是我从Heroku获得的两个进程的日志: 2012-06-16T15:36:12 + 00:00 app [web.2]:debug:设置轮询超时 […]

强制Heroku将应用程序视为Node.js

我有一个Node.js应用程序,我试图部署到Heroku。 然而,Heroku似乎认为它是一个Ruby应用程序,可能是因为它有一个Gemfile(我们有一个包含一些自定义脚本之类的私有gem,以及用于命令行控制的Heroku gem本身)。 我将Gemfile和Gemfile.lock添加到.slugignore(在Heroku的Slug Compiler文章中讨论过),但该应用程序仍然被检测为Ruby应用程序。 $ git push heroku master Total 0 (delta 0), reused 0 (delta 0) —–> Heroku receiving push —–> Ruby app detected —–> Installing dependencies using Bundler version 1.2.0.pre Running: bundle install –without development:test –path vendor/bundle –binstubs bin/ –deployment 捆绑失败,因为我们的自定义gem是一个私人回购,我从来没有得到任何进一步的。 我无法find任何方法强制Heroku将该应用程序视为Node.js应用程序,并使用Procfile来启动Web应用程序。 有没有人有想法我怎么能做到这一点?