can't install on glitch+mLab
See original GitHub issueHi, Thank you very much, this project is a great idea!
There are errors when trying to install it on glitch.com
I changed localhost to the correct domain name, adapted to use mLab db and had to run next build
in the console and it ran.
Web page is showing at https://alheimsins-bigfive-web.glitch.me, but example and finalizing the test throw client errors in the console, it’s related to the db since the results
collection is not created.
For example
:
{name: “Internal Server Error.”, message: “500 - Internal Server Error.”, statusCode: 500}
SW registered:
ServiceWorkerRegistration {scope: "https://alheimsins-bigfive-web.glitch.me/", updateViaCache: "imports", active: ServiceWorker, installing: null, navigationPreload: NavigationPreloadManager, …}
active: ServiceWorker {scriptURL: "https://alheimsins-bigfive-web.glitch.me/service-worker.js", state: "activated", onerror: null, onstatechange: null}
installing: null
navigationPreload: NavigationPreloadManager {}
onupdatefound: null
paymentManager: PaymentManager {instruments: PaymentInstruments, userHint: ""}
pushManager: PushManager {}
scope: "https://alheimsins-bigfive-web.glitch.me/"
sync: SyncManager {}
updateViaCache: "imports"
waiting: null
__proto__: ServiceWorkerRegistration
You can see more errors if you test it directly at https://alheimsins-bigfive-web.glitch.me AFAIK, there are no error in the server console though https://glitch.com/edit/#!/alheimsins-bigfive-web If you can’t access the server, tell me your glitch username and I’ll grant you write access.
I tried with now.sh but I don’t get why it can’t see the now.json in my repo at project creation and from the local CLI I get something weird:
PS E:\bigfive-web> .\now-win.exe secrets add b5-db-connection "username:password@ds32165.mlab.com:25574/db"
> Error! The secret name "b5-db-connection" already exists for this user
PS E:\bigfive-web> .\now-win.exe
> WARN! You are using an old version of the Now Platform. More: https://zeit.co/docs/v1-upgrade
> Deploying E:\bigfive-web under zeitco14
> Error! No secret found by uid or name "b5_db_connection"
> More details: https://err.sh/now-cli/env-no-secret
Frankly, glitch is far easier, all I need, I think, is to figure out is the db connection. Thanks for your help.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Haaa, “-” vs “_”, I didn’t see it! I followed your glitch way and had no server error and the example page working!
So, I tested the same process with my db but
next build
didn’t created theresults
collection and running the web server throws the error:So, it’s the collection creation that is not working somehow. I guess at the
next build
stage.I also tried with now-win (“Welcome to now way” 😃 ) but got a
glitch
(ok, I stop with puns):Sooo, back to square one.
BTW, I was surprised your credentials are working, I expected an error. So, I made a copy of the test collection on my mLab account. And now it’s working on glitch. It’s definitely a collection creation issue.
If I make the collection manually it works, so I’m fine.
Thanks for a great guide and your interest @j2l.
About now try
now-win.exe secrets add b5_db_connection "username:password@ds32165.mlab.com:25574/db
With underscore instead of hyphen.
About glitch
.env
file only gets read in dev environments.Try to paste this directly in
config.js
in the project root.Then presumably
next build
Try the database connection easily by navigate to https://alheimsins-bigfive-web.glitch.me/result/58a70606a835c400c8b38e84
And look in the console for errors.
The test-database should contain the
58a70606a835c400c8b38e84
reference.