Open edoko opened 7 months ago
Can you post direct link to your index.json?
Can you post direct link to your index.json?
@VillageR88 I've put the repo address above.
root: https://github.com/edoko/next-ssg-test/blob/main/package.json apps/main: https://github.com/edoko/next-ssg-test/blob/main/apps/main/package.json apps/sub: https://github.com/edoko/next-ssg-test/blob/main/apps/sub/package.json
I am still experiencing this issue. And recently a new issue was created by a user who is experiencing a similar problem. #64910
I was wondering if vercel is aware of this issue.
I think I'll probably end up abandoning the use of basePath in Next.js in favor of using subdomains. The use of basePath seems to have a number of issues 😢
Link to the code that reproduces this issue
https://github.com/edoko/next-ssg-test/tree/main
To Reproduce
/apps/sub/pages/index.tsx
and show the message of props in dom./apps/main/pages/index.tsx
/apps/sub/pages/index.tsx
and create the page(/apps/sub/pages/my.tsx
)https://deploy-main-app
(/apps/main
)/sub
and move the/sub
pageHello from getStaticProps!
) of getStaticProps/sub/my
and move the/sub/my
page/sub
page and not showing message of getStaticPropsCurrent vs. Expected behavior
Current:
https://next-ssg-test-main-app.vercel.app/sub/_next/data/{build_id}/index.json
is{}
.Expected:
https://next-ssg-test-main-app.vercel.app/sub/_next/data/{build_id}/index.json
isProvide environment information
Which area(s) are affected? (Select all that apply)
Data fetching (gS(S)P, getInitialProps), Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)
Additional context
I'm also running a real project using yarn workspace and basePath. middleware is also being used. If I used getStaticProps in '/index' of basePath, if I go back after moving to another page or click the link that moves to
/
, pageProp is returned empty.The first reproduced version was
v13.5.2
, and the same issue occurred even when updated tov14.1.0
andv14.1.4
, and the same problem occurred even when usingv14.2.0-canary.34
.So I created a project that could reproduce the above problem.
experience the problem for here: https://next-ssg-test-main-app.vercel.app/