Just-Moh-it / Pckd

The ⚡️ analytics-intensive, self-hostable link-shortener with a beautiful UI | AKA free bit.ly alternative 🚀
https://docs.pckd.me/
MIT License
783 stars 95 forks source link

Can't generate short URL - app crashing #57

Open ghost opened 2 years ago

ghost commented 2 years ago

I'm unsure how I managed this but I seem to have trouble getting my instance to generate short URLs.

This started after I started from scratch when I did a full upgrade to Ubuntu Server 22.04.

In terminal, [nodemon] app crashed - waiting for file changes before starting... (stuck on this 5+mins) image

On website after trying to generate a link, Error! Error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON image

Any ideas on how to possibly resolve this?

Just-Moh-it commented 2 years ago

@phoenpc This seems to be an issue with runtime. Could you update your description to show more logs...

Also, please confirm if the same happen while running npm run dev-server, or npm run dev-client?

Looks like the frontend is working well. Might be a database connection issue. Could you confirm you ran all the commands in the docs, in order?

ghost commented 2 years ago

npm run dev-server (it works until I try to generate a link) image

npm run dev-client image

No issues until I try to generate a short URL - I'm unsure how I can get more logs than this though as that is all that shows up when running the two commands advised, and also just starting it normally under npm start.

I can confirm I ran the steps in order, I actually re-cloned and re-downloaded/re-filled the .env values all from scratch as it broke after I went from Ubuntu 20.04 - 22.04 (as well as a bunch of other stuff). Env values I used here: https://paste.ivr.fi/ebudyfykyx.ini

For the database I currently use postgresql as it was just easier to deal with compared to mysql or other db's. image

Just-Moh-it commented 2 years ago

Alright, I think you should skip the dev server step and move directly to the build step, as in the docs. This seems to be a problem with the dev server