idoco / intergram

Free live chat widget linked to your Telegram messenger
https://www.intergram.xyz
Mozilla Public License 2.0
1.4k stars 357 forks source link

Self Hosting: npm start don't work #63

Open iPrinz96 opened 5 years ago

iPrinz96 commented 5 years ago

Hello. I using Debian 8.0 without ssl.. Also, I have type: npm start & get this error log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@6.4.1
3 info using node@v11.4.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle intergram@0.0.1~prestart: intergram@0.0.1
6 info lifecycle intergram@0.0.1~start: intergram@0.0.1
7 verbose lifecycle intergram@0.0.1~start: unsafe-perm in lifecycle true
8 verbose lifecycle intergram@0.0.1~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/chat.xxx.xyz/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
9 verbose lifecycle intergram@0.0.1~start: CWD: /var/www/chat.xxx.xyz
10 silly lifecycle intergram@0.0.1~start: Args: [ '-c', 'node server.js' ]
11 silly lifecycle intergram@0.0.1~start: Returned: code: 1  signal: null
12 info lifecycle intergram@0.0.1~start: Failed to exec start script
13 verbose stack Error: intergram@0.0.1 start: `node server.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:189:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:189:13)
13 verbose stack     at maybeClose (internal/child_process.js:978:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid intergram@0.0.1
15 verbose cwd /var/www/chat.xxx.xyz
16 verbose Linux 2.6.32-042stab127.2
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
18 verbose node v11.4.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error intergram@0.0.1 start: `node server.js`
22 error Exit status 1
23 error Failed at the intergram@0.0.1 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I hope any where can help me..

idoco commented 5 years ago

Hey @iPrinz96, did you run npm install? Also which node version are you running?

iPrinz96 commented 5 years ago

Version 6.5.0

i have update it from 6.4.1 to 6.5.0 & than "npm audit fix" & again npm install.

I can start it If i have start it, than come a console message: `> intergram@0.0.1 start /var/www/chat.xxx.xyz

node server.js

listening on port:3000 `

But if i try: "/start" in my Chat bot. then nothing comes back..

idoco commented 5 years ago

Nice, that's progress. (btw, the official supported node version is 6.9.1) Did you go through the process of registering your Telegram bot through the BotFather? Did your bot hook to your Intergram server URL? (You have to use an https URL for that)

iPrinz96 commented 5 years ago

Du you mean that with this url: https://api.telegram.org/bot/setWebhook?url=/hook? That I have do..

idoco commented 5 years ago

This doesn't look like a valid url - https://api.telegram.org/bot/setWebhook?url=/hook

This url is executed from Telegram's servers everytime your bot gets a Telegram message,/hook is not enough information from Telegram's perspective. It should be sonthing like - https://www.my_domain_name.com/hook

iPrinz96 commented 5 years ago

This doesn't look like a valid url - https://api.telegram.org/bot/setWebhook?url=/hook

This url is executed from Telegram's servers everytime your bot gets a Telegram message,/hook is not enough information from Telegram's perspective. It should be sonthing like - https://www.my_domain_name.com/hook

I know. that was a question to you. Because I did not know, what do you mean..

i have try: npm start This ist the output: `root@vps:/var/www/chat.iHabbo.xyz# npm start

intergram@0.0.1 start /var/www/chat.iHabbo.xyz node server.js

listening on port:3000`

Pycomet-zz commented 4 years ago

I have cloned the repository and followed the basic instructions for SelfHosting, but still unable to see the widget whenever I load the page. Even running locally with 'npm start', I am still getting nothing in return.

Here is the url I hosted to - telegramwidget.herokuapp.com