next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Using "jsonpath" package in a route handler causes the route to respond with not found

Open drorIvry opened this issue 1 year ago • 0 comments

Link to the code that reproduces this issue

https://github.com/drorIvry/jsonpath-bug

To Reproduce

  1. start app in development
  2. run in terminal curl http://localhost:3000/api/test
  3. you'll get the NotFound page
  4. if you un-comment the export const runtime = 'edge' OR if you remove the jsonpath code and run again you'll get {"success": true}

Current vs. Expected behavior

current: getting the NotFoundPage expected: the route handler will run correctly

Provide environment information

Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
    Binaries:
      Node: 20.9.0
      npm: 9.8.1
      Yarn: 1.22.19
      pnpm: 8.10.2
    Relevant packages:
      next: 13.0.8-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) are affected? (Select all that apply)

App Router

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

No response

drorIvry avatar Feb 01 '24 14:02 drorIvry