commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Error: Page with slug 'en-US/<no source>' not found

Open Florian-crg opened this issue 4 years ago • 3 comments

What version of Next.js are you using?

11.0.0

What version of Node.js are you using?

v12.22.1

What browser are you using?

Chrome, Firefox

What operating system are you using?

MacOS M1

How are you deploying your application?

next dev

Describe the Bug

I've just cloned the repo and I get the following error

error - pages/[...pages].tsx (42:10) @ getStaticProps
Error: Page with slug 'en-US/<no source>' not found
...

It seems to work normally, but the error is showing on each reload of first load.

Florian-crg avatar Sep 19 '21 17:09 Florian-crg

In getStaticPaths change it so that for the return its something like paths.map(path => ({ params: { pages: [path] } }))

kogan007 avatar Sep 22 '21 16:09 kogan007

I am not sure what you mean sorry.

Maybe you could make a PR, since this is a global concern ?

https://github.com/vercel/commerce/blob/main/pages/[...pages].tsx

Florian-crg avatar Nov 14 '21 10:11 Florian-crg

Did you manage to fix the issue? Just got the same errors in Next 12.

carl-st avatar Mar 20 '22 11:03 carl-st

Hey there! Thank you for opening this issue. We have decided to take Next.js Commerce in a new direction and will be closing out current PRs and issues due to this change. Please see this PR for more details: https://github.com/vercel/commerce/pull/966

leerob avatar Apr 18 '23 02:04 leerob