edgestorejs/edgestore

Issue when nextjs trailingSlash = true

dylee-sparta opened this issue · 4 comments

Background:

  • I am currently developing a web frontend application using Next.js.
  • The application is built on Next.js version 14.0.4.
  • I am attempting to upload files using a storage service called Edgestore.
  • To my understanding, Edgestore provides cloud storage services similar to AWS's S3.

Error Message:
I encountered an error while trying to integrate Edgestore into my project. The error message is as follows:

EdgeStoreError: Failed to parse response. Make sure the API is correctly configured at http://localhost:3000/api/edgestore/init/

Suspected Causes:

  • I suspect this issue might be related to the version of Next.js I am using. Could there be any compatibility issues with Next.js 14.0.4?
  • Or my layout.tsx
  • Here is my src/app/layout.tsx file
  • Because when i debug my project code, i deleted all code related edgestore without
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <EdgeStoreProvider>{children}</EdgeStoreProvider>
        <Toaster />
      </body>
    </html>
  );
}

Hi @dylee-sparta!
There should be no compatibility issue with next 14.
Can you take a look at the troubleshooting docs? It should help you fix your problem. If you still have problems after it, feel free to reach out!

Oh! sorry.
This is completely my falut.
The reason of a problem is trailingSlash(=true) option of my Next project.
So, the problem and work well api path like below

 http://localhost:3000/api/edgestore/init/    // not work

 http://localhost:3000/api/edgestore/init     // work

So, when i turn off trailingSlash option of Next, edgestore is work well.
Thanks to reply.

And, i hope edgestore team can also consider trailing slash.
Thanks to read my question written by beginner of english.

Oh! I wasn't aware of this problem. Thank you for reporting it. Let's leave the issue open for now until we handle that.

This should be fixed in version 0.2.1.