Anyone else having issues installing medusa on Vercel - I am using the one-click installation, and getting errors: Error: connect ECONNREFUSED ::1:80 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 80, config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [Function: httpAdapter], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, validateStatus: [Function: validateStatus], headers: { Accept: 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'axios/0.24.0' }, baseURL: 'MEDUSA_BACKEND_URL/admin-dash',
Can you help resolve this - up all night trying to make it work. Any and every help/guide is very much appreciated.
#One Click installation continues to be issue prone
79 messages · Page 1 of 1 (latest)
Do you mean Medusa storefront (Nextjs) or the backend ? because the backend is not installable on Vercel
Don't worry there are many threads talking about the installation in this channel
@hallow turtle This is for the Storefront (nextJS), as for the backend - also having issue with login - the admin password and email that i set didnt work - please help resolve this, its for a client project, and its past due as I haven't even gotten to the actual work yet
Yes, it's two separate deployments but can be done once on a server
I did the deployment with the one click installation, was hoping for a seamless one
can you help resolve?
this was supposed to be a two day client project, but i havent even gone past installation/setup
yes it takes some time to understand how it works
but after that it's easy
basically the nextjs repo is a STARTER
Oh i completely understand - spent the entire night combing through the docs, but finally stumbled on the one-click installation thing (nextJS starter), but then got that error
ok, on vercel
start by cloning the repo
then go to your vercel projects and add it, click on deploy and tell me what you got
one sec...im on it right now while I have your attn
I am here in general, no problem
@simple nexus You haven't tried medusa localy have you?
yes i setup the admin (backend), and was able to get in the dashboard
Your baseurl is wrong: baseURL: 'MEDUSA_BACKEND_URL/admin-dash',
you have not set medusa backend url env var on stoerfront
and admin IS NOT backend
I see, can you please walk me through it?
Sure admin now can be hosted alongside backend at /app path
Sorry but the docs ale superb
Where did you deploy backend?
the backend was also deployed on Vercel, db @Neon.tech
Backend can't be deployed on Vercel
that's the point
I thought people made it clear for you in other thread
The backend seems to be working except for the login issue: https://goodniche-medusa-jico8zs4v-publictrades.vercel.app/login
yes here we are a lot https://discord.com/channels/876835651130097704/1124970204670206092
No, it's not working
We made it clear for you in the other thread that you can't deploy to Vercel
I can't cope with this, I'm out
I've made the same error at my beggining in with Medusa then I have understood how it works
No problem kosek let me continue this thread my friend
Just wake up, and now just reading the thread -thanks
ok
So, I'll give it a shot with the backend, as for the frontend (NextJs) - How do i resolve
Get the backend deployed first, then look at the next storefront. As kosek pointed out, it's not even pointing at a valid URL, let alone a working backend
I used the CLI to deploy it, I was able to get it up, login to the dashboard locally, then prompted to deploy the the frontend. I didn't manually deploy to ....say, Railway.app or any other provider.
railway will be paid as it was said in the other thread
So question is ... lets to deploy the backend to railway (i have an account), how do I get started from the terminal?
cool, thanks guys!.. i'll get on it.
Here is a copy of my .env for the base url MEDUSA_BACKEND_URL=https//:www.gudniche.com/admin-dash. So you are saying that it should be baseUrl = https//:www.gudniche.com/admin-dash assuming that <MEDUSA_BACKEND_URL> is gudniche.com. This is set in the .env file correct?
Also, from this file /src/admin/components/shared/hooks.tsx - I have this code:
import { createCustomAdminHooks } from "medusa-react";
const {
useAdminEntity: useAdminOnboardingState,
useAdminUpdateMutation: useAdminUpdateOnboardingStateMutation,
} = createCustomAdminHooks("onboarding", "onboarding_state");
export { useAdminOnboardingState, useAdminUpdateOnboardingStateMutation };```
createCustomAdminHooks is lighting up with `Module '"medusa-react"' has no exported member 'createCustomAdminHooks'.`
Oh, Im sorry - didnt catch that
no stress
@hallow turtle - I am unable to login with my login info I set up when I installed the backend. How can I edit/ change that - I can't login locally now neither. I tried creating a new use using this command npx @medusajs/medusa-cli user -e [email protected] -p some-password - didnt work neither
locally or on railway ?
locally, I think its best to move forward to railway with what I have locally since that is working - if I am able to login
what is the error ?
Also, I don't remeber that it asks for user credentials at installation
it's by default
supersecret
Oh, cool. Thanks. I was trying it with the one I setup with when I got prompted. Works now
nice
I don't remember to be prompted
basically it just seed the database with data
Just to re-iterate on the workflow (in this order):
- Setup and deploy backend to railway - thissets up the server and admin dashboard.
2.Deploy frontend to Vercel.
?
alos, for the baseUrl - its set in the .env file as baseUrl = <backend_url/"whatever-string-for-admin" ? or is it set in another file such as medusa-config.js?
on railway don't deploy the admin dashboard because it has not a lot of RAM
don't touch medusa-config for the moment