You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[][v2] jeff@Mac
/Users/Jeff/code/node/nextjs/my-medusa-storefront01
$ npm run dev
> [email protected] dev
> next dev -p 8000
▲ Next.js 14.2.15
- Local: http://localhost:8000
- Environments: .env.local
✓ Starting...
✓ Ready in 1626ms
✓ Compiled /src/middleware in 398ms (89 modules)
⨯ src/middleware.ts (22:31) @ fetch
⨯ fetch failed
20 | ) {
21 | // Fetch regions from Medusa. We can't use the JS client here because middleware is running on Edge and the client needs a Node en
> 22 | const { regions } = await fetch(`${BACKEND_URL}/store/regions`, {
| ^
23 | headers: {
24 | "x-publishable-api-key": PUBLISHABLE_API_KEY!,
25 | },
○ Compiling /_error ...
✓ Compiled /_error in 1186ms (254 modules)
GET / 404 in 4ms
○ Compiling /_not-found ...
⚠ Fast Refresh had to perform a full reload due to a runtime error.
⨯ src/middleware.ts (22:31) @ fetch
⨯ fetch failed
20 | ) {
21 | // Fetch regions from Medusa. We can't use the JS client here because middleware is running on Edge and the client needs a Node en
> 22 | const { regions } = await fetch(`${BACKEND_URL}/store/regions`, {
| ^
23 | headers: {
24 | "x-publishable-api-key": PUBLISHABLE_API_KEY!,
25 | },
✓ Compiled /_not-found in 7.4s (4360 modules)
GET / 404 in 2ms
⚠ Fast Refresh had to perform a full reload due to a runtime error.
⨯ src/middleware.ts (22:31) @ fetch
⨯ fetch failed
20 | ) {
21 | // Fetch regions from Medusa. We can't use the JS client here because middleware is running on Edge and the client needs a Node en
> 22 | const { regions } = await fetch(`${BACKEND_URL}/store/regions`, {
| ^
23 | headers: {
24 | "x-publishable-api-key": PUBLISHABLE_API_KEY!,
25 | },
⨯ src/middleware.ts (22:31) @ fetch
⨯ fetch failed
20 | ) {
21 | // Fetch regions from Medusa. We can't use the JS client here because middleware is running on Edge and the client needs a Node en
> 22 | const { regions } = await fetch(`${BACKEND_URL}/store/regions`, {
| ^
23 | headers: {
24 | "x-publishable-api-key": PUBLISHABLE_API_KEY!,
25 | },
GET / 404 in 1ms
How can this issue be resolved?
...
Are you interested in working on this issue?
I would like to fix this issue
The text was updated successfully, but these errors were encountered:
UPDATE:
I resolved the node issue you see in the yellow square in the original screenshot but I hit the same server exception. I am going to try the other method: npx create-medusa-app@latest.
Are you sure your back end is running? You will get this error if your back-end is not working on localhost:9000 as specified in the environment variable: NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://localhost:9000
What Medusa version and documentation are you using?
v2
Preliminary Checks
Issue Summary
I did my due diligence for finding a dupe - none found.
-= STEPS TO REPRO =-
How can this issue be resolved?
...
Are you interested in working on this issue?
The text was updated successfully, but these errors were encountered: