Comments (6)
@ugoarzur I just did the set up to test the app and everything worked. Here is the video I recorded as I was trying to reproduce you issue.
issue-reproductionext-setup.mp4
Also, we have open office hours on Strapi's Discord, you can stop by and we can look at your issue together.
https://discord.com/invite/strapi
Mon - Fri 12:30 PM CST time.
from nextjs-corporate-starter.
HI @custards, Could you try creating an API with Full Access and put it in the .env file in the frontend folder to try to resolve this issue? If it works, you can change the API Token permission later.
from nextjs-corporate-starter.
@ugoarzur I am going to see if I can reproduce your issue, in terms of the link you shared here it refers to the pages folder structure, but here we are using app router.
I will see if I can recreate it and see if I get the same issue. Thank you for bringing this to my attention.
from nextjs-corporate-starter.
This error is thrown when you add invalid API Token in your frontend. Make suer you added the correct token in your frontend .env file.
NEXT_PUBLIC_STRAPI_API_TOKEN=your-api-token
NEXT_PUBLIC_PAGE_LIMIT=6
NEXT_PUBLIC_STRAPI_FORM_SUBMISSION_TOKEN=your-form-submission-token
NEXT_PUBLIC_STRAPI_API_URL=http://localhost:1337
from nextjs-corporate-starter.
Hi 👋🏻
I was curious to give it a try but I found this very same issue although I followed this guide from Vercel, generated my api tokens from the strapi dashboard and inserted them into my frontend/.env
file.
I am not a frontend expert but (to me) window is not defined
seems more related to a frontend absence of the window
because the components may have been generated from the server.
According to the Next.js SSR Component Documentation this behaviour is an SSR component and therefore there is no window in server.
To use Server-side Rendering for a page, you need to
export
anasync
function called getServerSideProps. This function will be called by the server on every request.
from nextjs-corporate-starter.
Hey! I really appreciate your help with the issue and even providing a walkthrough. I was actually able to get it to work by regenerating more tokens. Only difference was that I set a duration of unlimited this time instead of 7 days when I first reported the issue. Couldn't really say why this had the effect it did as I did try new tokens multiple times but maybe something was botched on my end that I didn't notice.
from nextjs-corporate-starter.
Related Issues (20)
- Next 14 & Strapi Demo Project Is Here HOT 3
- [Bug] Localization issue HOT 4
- Typescript - Using the 'model.ts' file [ I added a post at the bottom on guide to implement Strapi types in the frontend. HOT 1
- Bug - responsive menu doesn't work correctly and overlay text and logo HOT 4
- TODO: Suggestion: Remove NEXT_PUBLIC Prefix for API Keys in .env File HOT 2
- Could you please add a LICENSE information. HOT 1
- TODO: Implement The Large Video Component from the Dynamic Component In The Frontend [ Issue ] HOT 3
- Multilungual Styles HOT 2
- site loads fine, when I refresh blog page it renders json chunks , not html HOT 2
- No documentation on deploying to Vercel HOT 3
- Images for navbarLogo, footerLogo & testimonials are not set by default, causing the frontend not to load HOT 2
- Seed into mysql doesn't work HOT 3
- Adding a picture in Sections HOT 4
- Issues on development environment in other languages HOT 5
- Warnings during yarn setup HOT 1
- error after fixing page,tsx (invariant expected app router to be mounted ) HOT 2
- Replace Gif with .mp4
- Custom color breaks the style
- Relations of type error HOT 1
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-corporate-starter.