#Static page build on app directory doesn't work

16 messages · Page 1 of 1 (latest)

thick aurora
#

So I have .env with auth token from my CMS so that I can generate pages dynamically on build and I hope to build them statically. However, I tried to remove the .env file before running next start and everything just break. Why is this?

warm boneBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

thick aurora
#

Static page build on app directory doesn't work

dim ridge
#

if it is a dynamic page, you probably need to add generateStaticParams and export const dynamicParams = false to those pages

thick aurora
#

The problem still persist.
After build, I removed the .env file, and the "statically build pages" are broken with error not finding the authentication code for the CMS graphql query. Also...

dim ridge
thick aurora
#

@dim ridge Yes

dim ridge
#

Try removing it

thick aurora
#

wait hold on,..

#

@dim ridge yeah I still get Authentication failed

#

This is my graphcms client

dim ridge
#

Yeah then I don’t know, sorry

thick aurora