Next.js Discord

Discord Forum

Next.js build files doesn't include SSR files after a build process

Unanswered
Sporting Lucas Terrier posted this in #help-forum
Open in Discord
Sporting Lucas TerrierOP
Hi all, I'm facing an issue with my website build files. After extracting the build of my website using nodejs project like this , I've noticed that the server-side rendered files are not being updated when I make changes using the hosted UI platform's API. Specifically, the color of the website, set during the initial build, remains unchanged.
I've consulted the Next.js documentation and attempted to use getServerSideProps within my pages. However, I've observed that the SSR file is not included in the build, unlike the other client-side rendered files.
And my folder structure is
pages/
└── app
├── frame.tsx
├── index.tsx
├── layout.tsx
├── styles.css
└── widget
└── index.tsx

after taking build my folder structure will be
out/
├── 404.html
├── app
│ ├── frame.html
│ ├── layout.html
│ └── widget
├── app.html
├── favicon.ico
└── _next
├── oXzioVXy3PKi8ChWloRDz
└── static
├── chunks
│ ├── ...
│ ├── pages
│ │ ├── _app-52924524f99094ab.js
│ │ ├── app
│ │ │ ├── frame-a181ca21181a51d9.js
│ │ │ ├── layout-6b93fc29b4b06579.js
│ │ │ └── widget
│ │ │ └── frame-0b3639fb817ecd3f.js
│ │ ├── app-da2b6993ed269a27.js
│ │ └── _error-c92d5c4bb2b49926.js
│ ├── polyfills-78c92fac7aa8fdd8.js
│ └── webpack-74bb0f396544f68a.js
├── css
│ ├── 11a29fff0c86a568.css
│ ├── 727223782b90bae6.css
│ └── 99d0b902ca195ea4.css
└── oXzioVXy3PKi8ChWloRDz
├── _buildManifest.js
└── _ssgManifest.js

Inside out folder the widget folder is empty but the actual getServerSideProps used file is not added in the build that is inside the widget folder (SSR component)

4 Replies

Sporting Lucas TerrierOP
Can any gentleman come forward and help me to resolve this?
you would need to do it in the actual page as a queried variable and use jsx in the css
Sporting Lucas TerrierOP
Then in live, can't we get the updated website, like we can't get the API calls in SSR right @DirtyCajunRice | AppDir ?