Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on search causes an Internal Server Error #618

Open
nynevi opened this issue Jun 27, 2024 · 3 comments
Open

Clicking on search causes an Internal Server Error #618

nynevi opened this issue Jun 27, 2024 · 3 comments

Comments

@nynevi
Copy link

nynevi commented Jun 27, 2024

Description

  • clone repository from main branch on commit 0e40674e88f8429fbb136d032ae77be17f1bda9c (the latest as of this date)
  • make adjustments to site.config.ts as specified in readme
  • install packages using yarn
  • yarn dev
  • click on Search on top right

expected:

  • there is no internal server error

experienced:

  • there is an internal server error

Screenshot 2024-06-27 at 08 59 54

Notion Test Page ID

0191bcee9db04c3690b84062af8f12e2

@nynevi
Copy link
Author

nynevi commented Jun 27, 2024

just fyi the searching will still not work. see my comment in the PR #619 (comment)

@nynevi
Copy link
Author

nynevi commented Jun 27, 2024

for people trying to make searching work, react-notion-x version 6.16.1 has the fix NotionX/react-notion-x@v6.16.0...v6.16.1#diff-730f034e11dd4199e0434acf6897a2b1cb0642641b160fd1c5be24753fda487eR552
but unfortunately it is not published to npm. latest on npm is 6.16.0 https://www.npmjs.com/package/react-notion-x
I tried cloning react-notion-x and trying to build but ran into arm64 related issues of sharppackage.

I found an alternative https://github.com/ijjk/notion-blog but that also does not use official notion client https://www.npmjs.com/package/@notionhq/client
I anticipate that notion-blog will have similar issues. I think it is best that we create our own nextjs application with notion's client

@chandragie
Copy link

chandragie commented Oct 28, 2024

Hey, this happened to me also on Vercel (production) for several days.
I got it working now.

  1. Patch using @danni-cool method
  2. Build using next build and run next start. Test it in local.
  3. After confirming the search function is working, do deploy from local using vercel-cli (this is important)
  4. Run vercel deploy , it will trigger new deploy on Vercel. After the deployment done, test it using the assigned custom domain (search should work)
  5. Run vercel --prod to enable it to the main domain

I have no idea why the Vercel build by Git integration always gave me Uncaught Error: Could not load the "sharp" module using the linux-x64 runtime error. Building it from my local WSL machine and deploy it using CLI just works. 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants