#One Click installation continues to be issue prone

79 messages · Page 1 of 1 (latest)

simple nexus
#

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.

hallow turtle
#

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

simple nexus
#

@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

hallow turtle
#

Yes, it's two separate deployments but can be done once on a server

simple nexus
#

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

hallow turtle
#

yes it takes some time to understand how it works

#

but after that it's easy

#

basically the nextjs repo is a STARTER

simple nexus
#

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

hallow turtle
#

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

simple nexus
#

one sec...im on it right now while I have your attn

hallow turtle
#

I am here in general, no problem

valid obsidian
#

@simple nexus You haven't tried medusa localy have you?

simple nexus
#

yes i setup the admin (backend), and was able to get in the dashboard

valid obsidian
#

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

simple nexus
#

I see, can you please walk me through it?

valid obsidian
#

Sure admin now can be hosted alongside backend at /app path

#

Sorry but the docs ale superb

#

Where did you deploy backend?

simple nexus
#

the backend was also deployed on Vercel, db @Neon.tech

valid obsidian
#

Backend can't be deployed on Vercel

hallow turtle
#

that's the point

valid obsidian
#

I thought people made it clear for you in other thread

simple nexus
hallow turtle
valid obsidian
#

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

hallow turtle
#

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

simple nexus
#

Just wake up, and now just reading the thread -thanks

hallow turtle
#

ok

simple nexus
#

So, I'll give it a shot with the backend, as for the frontend (NextJs) - How do i resolve

hallow turtle
#

step by step

#

it's two diffrent things

sweet pond
#

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

simple nexus
#

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.

hallow turtle
#

railway will be paid as it was said in the other thread

simple nexus
#

So question is ... lets to deploy the backend to railway (i have an account), how do I get started from the terminal?

simple nexus
#

cool, thanks guys!.. i'll get on it.

simple nexus
#

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'.`
hallow turtle
#

but you have first to deploy backend not on vercel

#

kosek is out for this thread 🙂

simple nexus
#

Oh, Im sorry - didnt catch that

hallow turtle
#

no stress

simple nexus
#

@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

hallow turtle
#

locally or on railway ?

simple nexus
#

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

hallow turtle
#

what is the error ?

#

Also, I don't remeber that it asks for user credentials at installation

#

it's by default

#

supersecret

simple nexus
#

Oh, cool. Thanks. I was trying it with the one I setup with when I got prompted. Works now

hallow turtle
#

nice

#

I don't remember to be prompted

#

basically it just seed the database with data

simple nexus
#

Just to re-iterate on the workflow (in this order):

  1. 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?

hallow turtle
#

on railway don't deploy the admin dashboard because it has not a lot of RAM

#

don't touch medusa-config for the moment

simple nexus
#

I see. Thanks for that info

#

Very helpful. Thank you so much. I think I have enough info to deploy now

#

One last thing I promise. Setting these values:

STORE_CORS=https//:www.website.com
ADMIN_CORS=

They also go in the .env file?

hallow turtle
#

always you write //:

#

it's http:// 😄

#

but no stress keep going