Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now v2 support #399

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

now v2 support #399

wants to merge 5 commits into from

Conversation

deitch
Copy link

@deitch deitch commented Apr 28, 2019

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

This PR switches to now v2 support.

@vercel
Copy link

vercel bot commented Apr 28, 2019

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

@guitcastro
Copy link

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

@deitch
Copy link
Author

deitch commented May 28, 2019

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

@chrismetz09
Copy link

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
Copy link
Author

deitch commented Jun 11, 2019

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
Copy link
Author

deitch commented Jun 18, 2019

@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
Copy link
Author

deitch commented Jun 18, 2019

@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
Copy link
Author

deitch commented Jun 18, 2019

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
Copy link
Author

deitch commented Jun 18, 2019

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
Copy link

For me it works like a charm 👍

@chrismetz09
Copy link

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
Copy link
Author

deitch commented Jun 20, 2019

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
Copy link
Author

deitch commented Jun 20, 2019

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
Copy link

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
Copy link

Deployed successfully on Heroku.

For Now V2:

  • Recaptcha "invalid domain for site key" resolved by configuring hosting site (e.g. slackin.blah.now.sh) under domains in recaptcha settings (I used v2)

  • received this error during build so replaced "node":"6.11.1" with "10.16.0" and it succeeded.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants