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
{{ message }}
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.
Mac OS Ventura
Next.JS - 12.3.0
Node.JS version - 16.19.0
sls-next/serverless-component - 3.7.0
Serverless Version
Framework Core: 3.25.1
Plugin: 6.2.2
SDK: 4.3.2
Content of serverless.yml
component: "./node_modules/@sls-next/serverless-component"
inputs:
roleArn: "arn:aws:iam::656114780823:role/nygvfxo-ufm55u8" # has admin permissions
The deployment works fine, I deploy from my machine, without any errors.
I'm trying to enable ISR on my project to be able ti generate pages and my getStaticProps looks like this
constOfferingPage: FC<{offeringData: {data: Offering}}>=()=>{constrouter=useRouter();return<mainclassName="site-main hfeed"id="main"><divdata-elementor-type="wp-page"data-elementor-id="2952"className="elementor elementor-2952"><div>The ID is {router?.query?.offering_id}</div></div></main>};exportconstgetStaticProps: GetStaticProps=async(context)=>{// I removed every logic from here for simplicityreturn{props: {offeringData: {},},revalidate: 60};};exportconstgetStaticPaths: GetStaticPaths=async()=>{constresponsePremium=awaitAxiosApiService.getIds(true);constpaths=responsePremium?.data?.map((item: string)=>{return{params: {offering_id: item},};});return{
paths,fallback: true,};};
Actual behavior
I have a url structure like this https://d1ut6e5vnq8i6g.cloudfront.net/offering/{:id}/. If the id exists in my getStaticPaths, it works fine. However when id is new, and I assume that's when regeneration should happen. However, in those cases application fails with he following error.
Application error: a client-side exception has occurred (see the browser console for more information).
This is the browser console log.
Seems like the issue is the 404 request to get static props, which works fine for all existing ids. https://d1ut6e5vnq8i6g.cloudfront.net/_next/data/99wTahfTVhXTAQeDVyzQ3/offering/991a5af4-57ed-4822-855c-02ce590dbd71.json?offering_id=991a5af4-57ed-4822-855c-02ce590dbd71
*note all application logic is removed form the code for simplicity, so my code is exactly as above.
The Lambda for regeneration is being called as expected, it seems, without error, but the files are not added to S3, and no lambda is called besides regeneration lambda(not sure when they meant to).
Expected behavior
I expect the page to be generated on request and returned which does not happen.
Can anyone relate the issue, or might be I'm using wrong configuration?
The text was updated successfully, but these errors were encountered:
Things I tried on getStaticPaths to get revalidation to work, but failed. Cloudwatch logs did not show any new rendering of pages.
This will return an error on any page Application error: a client-side exception has occurred (see the browser console for more information).
return{paths: [],fallback: true,};
This will return pre-rendered page, with the same timestamp as build time. No revalidation occurs. It returns an error on non-pre-rendered page Application error: a client-side exception has occurred (see the browser console for more information).
Content of serverless.yml
The deployment works fine, I deploy from my machine, without any errors.
I'm trying to enable ISR on my project to be able ti generate pages and my
getStaticProps
looks like thisActual behavior
I have a url structure like this
https://d1ut6e5vnq8i6g.cloudfront.net/offering/{:id}/
. If theid
exists in mygetStaticPaths
, it works fine. However whenid
is new, and I assume that's when regeneration should happen. However, in those cases application fails with he following error.Application error: a client-side exception has occurred (see the browser console for more information).
This is the browser console log.
Seems like the issue is the 404 request to get static props, which works fine for all existing ids.
https://d1ut6e5vnq8i6g.cloudfront.net/_next/data/99wTahfTVhXTAQeDVyzQ3/offering/991a5af4-57ed-4822-855c-02ce590dbd71.json?offering_id=991a5af4-57ed-4822-855c-02ce590dbd71
*note all application logic is removed form the code for simplicity, so my code is exactly as above.
The Lambda for regeneration is being called as expected, it seems, without error, but the files are not added to
S3
, and no lambda is called besides regeneration lambda(not sure when they meant to).Expected behavior
I expect the page to be generated on request and returned which does not happen.
Can anyone relate the issue, or might be I'm using wrong configuration?
The text was updated successfully, but these errors were encountered: