rauchg / slackin

Public Slack organizations made easy
http://rauchg.com/slackin/
MIT License
6.5k stars 1.35k forks source link

now v2 support #399

Open deitch opened 5 years ago

deitch commented 5 years ago

As discussed in #394 , you cannot use now version 2 to deploy with the current structure.

This PR switches to now v2 support.

vercel[bot] commented 5 years ago

This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push.

guitcastro commented 5 years ago

I tried to deploy using your branch, the page load fines, however, the javascript fails to load assets/superagent.js and others.

deitch commented 5 years ago

Hi @guitcastro ; can you point me at a deployment? I will rerun mine as well over the coming days.

chrismetz09 commented 5 years ago

Wondering if this has been resolved yet. Cloned and typed in now slackin.

CHMETZ-M-72TZ:~ chrismetz$ now slackin
> WARN! Your project is missing a now.json file with a `version` property. More: https://zeit.co/docs/version-config
> Deploying ~/slackin under cymetz
> Using project slackin
> https://slackin-erl8azh8n.now.sh [v2] [2s]
> Ready! Aliased to https://slackin.cymetz.now.sh [in clipboard] [2s]

Created a now.json file with "version": '2" but another message indicated there was already a now config in package.json. Can I do anything to hack this up and get it working?

deitch commented 5 years ago

Nope. I opened the PR, worked for me (famous last words), @guitcastro pointed out an issue, but have not had time to come back to it. Will get to it....

deitch commented 5 years ago

@chrismetz09 , how did you get the following:

WARN! Your project is missing a now.json file with a version property. More: https://zeit.co/docs/version-config

There definitely is a now.json file and it has a version property here

deitch commented 5 years ago

@guitcastro I am seeing it now. It looks like not all of the lib/assets/ are being placed where they should when building:

> Deploying ~/Documents/Development/rauchg/slackin under deitch
> Using project slackin
> Synced 1 file (4.16KB) [680ms]
> https://slackin-ax7842yt5.now.sh [v2] [2s]
┌ lib/assets/*        Ready               [162ms]
├── lib/assets/verdana.ttf
├── lib/assets/client.js
├── lib/assets/iframe-button.css
├── lib/assets/iframe.js
├── lib/assets/badge.js
└── 5 output items hidden
┌ lib/now.js          Ready               [55s]
└── λ lib/now.js (4.89MB) [sfo1]
> Ready! Aliased to https://slackin.deitch.now.sh [in clipboard] [1m]

Or maybe it is, but is in the "5 output items hidden"? Not sure...

deitch commented 5 years ago

No, it is. I just looked at the output, and see it under assets/. Actually, it is putting them there, but is failing to send anything with *.js, preferring a 404.

deitch commented 5 years ago

Phew. It had to do with the now-v2 routes (and docs that didn't make it easy to know that was how it worked).

@guitcastro take another look please?

splitt3r commented 5 years ago

For me it works like a charm 👍

chrismetz09 commented 5 years ago

Progress. Grabbed and deployed https://github.com/deitch/slackin/tree/now-v2. But then showing the feared "invalid domain for site key" message. Tried regenerating recaptcha sitekey and secrets but same result. Also seeing websocket handshake 400s in console. Guidance on how to resolve? In the meantime will keep looking at it.

Screen Shot 2019-06-20 at 2 47 05 PM
deitch commented 5 years ago

Also seeing websocket handshake 400s in console

I am assuming the above are related but unsure. I didn't dig as deeply into the nitty-gritty of how it works under the covers (although it looks like it should be reasonably straightforward). @guitcastro do you know how to debug it?

deitch commented 5 years ago

Well... it looks like now v2 does not yet support WebSockets. Search their spectrum support channels. It has been an open issue for 6 months. Any maintainers here have an alternative pattern?

chrismetz09 commented 5 years ago

Confirming no Now v2 websockets support per https://spectrum.chat/zeit/now/slackin-not-working~3451a20c-90ba-45bb-8ec3-40157547b58b

will now try IBM cloud and report back

chrismetz09 commented 5 years ago

Deployed successfully on Heroku.

For Now V2:

Error: found engines in package.json with an unsupported node range: 6.11.1 please use 10.x or 8.10.x instead at Object.getSupportedNodeVersion (/tmp/ca088a2/.build-utils/node_modules/@now/build-utils/dist/fs/node-version.js:28:19) at getNodeVersion (/tmp/ca088a2/.build-utils/node_modules/@now/build-utils/dist/fs/run-user-scripts.js:64:27) at

Alas it appears missing web sockets support problem persists.