next.js
next.js copied to clipboard
Using "jsonpath" package in a route handler causes the route to respond with not found
Link to the code that reproduces this issue
https://github.com/drorIvry/jsonpath-bug
To Reproduce
- start app in development
- run in terminal
curl http://localhost:3000/api/test
- you'll get the NotFound page
- 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