Comments (13)
In my case, Next required data from API (provided for another service in my localhost).
Compile fails with this error if the service is not up.
from nextjs-starter-medusa.
ok the issue was just env var not being properly set in Vercel, as I had integrated Railway and overlooked one of the var was still missing in Vercel project!
from nextjs-starter-medusa.
I have the same problem, how do you solve it?
from nextjs-starter-medusa.
I am having the same issue, did u solve? the error message is the same but with "Next.js (14.0.0) out of date"
from nextjs-starter-medusa.
In my case, Next required data from API (provided for another service in my localhost). Compile fails with this error if the service is not up.
Could you explain this more please, I'm trying to figure this out myself
from nextjs-starter-medusa.
In my case, Next required data from API (provided for another service in my localhost). Compile fails with this error if the service is not up.
Could you explain this more please, I'm trying to figure this out myself
He means that you have to create the storefront but with the medusa backend running. I tried it like this and it worked for me.
from nextjs-starter-medusa.
In my case, Next required data from API (provided for another service in my localhost). Compile fails with this error if the service is not up.
Could you explain this more please, I'm trying to figure this out myself
He means that you have to create the storefront but with the medusa backend running. I tried it like this and it worked for me.
I see, what if I'm hosting it on railway? I tried putting the railway url under NEXT_PUBLIC_MEDUSA_BACKEND_URL, got nothing tho
from nextjs-starter-medusa.
Errors: metadata.metadataBase is not set for resolving social open graph or twitter images
They are fixed by exporting metadataBase
from app/layout.tsx
.
I sitll get failure with Vercel deployment:
Collecting page data ...
15:29:43.125 | Generating static pages (0/17) ...
15:29:43.470 | ⚠ Entire page /404 deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /404
15:29:43.475 | Generating static pages (4/17)
15:29:43.727 | ⚠ Entire page /checkout deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /checkout
15:29:43.728 | Generating static pages (8/17)
15:29:43.867 | ⚠ Entire page /account/orders deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/orders
15:29:43.868 | ⚠ Entire page /account deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account
15:29:43.868 | ⚠ Entire page /account/addresses deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/addresses
15:29:43.913 | Generating static pages (12/17)
15:29:43.913 | ⚠ Entire page /account/profile deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/profile
15:29:43.913 | ⚠ Entire page /cart deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /cart
15:29:43.946 | ⚠ Entire page /account/login deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/login
15:29:43.952 | ⚠ Entire page /store deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /store
15:29:43.967 | ⚠ Entire page / deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /
15:29:43.969 | { error: 'fetch failed' }
15:29:43.989 | { error: 'fetch failed' }
15:29:43.989 |
15:29:43.989 | Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
15:29:43.989 | [object Object]
15:29:43.994 | ✓ Generating static pages (17/17)
15:29:44.008 |
15:29:44.009 | > Export encountered errors on following paths:
15:29:44.009 | /(main)/page: /
15:29:44.096 | error Command failed with exit code 1.
15:29:44.097 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
15:29:44.113 | Error: Command "yarn run build" exited with 1
Although locally I see not problem with yarn build
:
Linting and checking validity of types
✓ Collecting page data
Generating static pages (0/17) [ ] ⚠ Entire page /404 deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /404
⚠ Entire page /account/login deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/login
⚠ Entire page /account/orders deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/orders
⚠ Entire page /cart deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /cart
⚠ Entire page /account deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account
⚠ Entire page /checkout deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /checkout
⚠ Entire page /account/profile deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/profile
⚠ Entire page /account/addresses deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /account/addresses
Generating static pages (1/17) [= ]
⚠ Entire page /store deopted into client-side rendering. https://nextjs.org/docs/messages/deopted-into-client-rendering /store
✓ Generating static pages (17/17)
✓ Collecting build traces
✓ Finalizing page optimization
from nextjs-starter-medusa.
ok the issue was just env var not being properly set in Vercel, as I had integrated Railway and overlooked one of the var was still missing in Vercel project!
Having the same problem, which env did you not properly set in Vercel?
from nextjs-starter-medusa.
@SharadKumar what var was it? Would have helped to mention it.
@Kofi-Emma Did you solve it / find the var?
from nextjs-starter-medusa.
@salvinoto did you solve this?
from nextjs-starter-medusa.
@olivermrbl Hey Oliver, any idea what this could be? I'm stuck with this and having exactly the same issue as @SharadKumar on Vercel deployment (not locally)
from nextjs-starter-medusa.
Hey @denisfelst - like others mentioned, errors like this usually indicate a failing connection to the Medusa server. The crucial env var to set is NEXT_PUBLIC_MEDUSA_BACKEND_URL
. Make sure it points to an active Medusa server, including the protocol but without a trailing slash. E.g.: https://my-medusa-server.herokuapp.com
Double check if your Medusa server is running and healthy by visiting <YOUR-SERVER-URL>/health
. This should return OK.
from nextjs-starter-medusa.
Related Issues (20)
- checkout breaks when Paystack is the only payment provider HOT 1
- App won't build with yarn build HOT 3
- Slow API fetch, both in dev and prod HOT 5
- Unsecured Cookie Allows Unauthorized Access to Discounts and Shipping Address in This Template HOT 1
- bug: Click to log out, unable to login again
- Installation error on latest macOS (number-float64-base-normalize)
- Error: A "use server" file can only export async functions. HOT 4
- Javascript HOT 1
- SyntaxError: Unexpected token < in JSON at position 0 HOT 4
- MeiliSearch Instantsearch RefinementList is not working HOT 1
- Medusa client or Nextjs caching bearer token between requests to backend for different user sessions HOT 1
- Refreshing on account pages and then logging out redirects to a 404 and not the login page
- Fix modal overflow on small viewports
- Menu overflow on small viewports
- Paypal Live Mode does not work HOT 10
- Forgot/Reset Password HOT 2
- Cannot finish checkout process when a user applies a giftcard HOT 2
- TypeError: fetch failed src\middleware.ts (21:30) @ fetch HOT 1
- How to change stripe element to more payment methods?
- https://docs.medusajs.com/recipes/b2b no longer works server/client side HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextjs-starter-medusa.