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

[Bug] No match found for location with path "/api/bundle.js.map" #99

Open
zoey-kaiser opened this issue Dec 4, 2023 · 1 comment
Open

Comments

@zoey-kaiser
Copy link

Hello! Thank you for your awesome work! We are currently experiencing the following issue with our setup. Whenever we try and load the page we get the following error message in the server console:

Error

[Vue Router warn]: No match found for location with path "/api/bundle.js.map"

On the client we get the following other error:

Uncaught TypeError: n is undefined
    TT http://localhost:3000/api/docs:1178
    ys http://localhost:3000/api/docs:1081
    yu http://localhost:3000/api/docs:1081
    fc http://localhost:3000/api/docs:1081
    cc http://localhost:3000/api/docs:1081
    uc http://localhost:3000/api/docs:1081
    Xu http://localhost:3000/api/docs:1081
    Yu http://localhost:3000/api/docs:1081
    x http://localhost:3000/api/docs:1071
    O http://localhost:3000/api/docs:1071
    EventHandlerNonNull* http://localhost:3000/api/docs:1071
    <anonymous> http://localhost:3000/api/docs:1071
    <anonymous> http://localhost:3000/api/docs:1061
    <anonymous> http://localhost:3000/api/docs:1061
docs:1178:25369

Environment

We have the following systems installed:

------------------------------
- Operating System: Darwin
- Node Version:     v20.6.1
- Nuxt Version:     3.8.0
- Nitro Version:    2.7.2
- Package Manager:  [email protected]
- `trpc-panel` version: 1.3.4 (but also tested with `1.2.8`)
------------------------------

As you can see above we are using Nuxt3! We have the trpc-panel integrated in the following way:

import { renderTrpcPanel } from 'trpc-panel'
import { router } from '../trpc/routers'

export default eventHandler((event) => {
  setResponseHeader(event, 'content-type', 'text/html; charset=utf-8')
  return renderTrpcPanel(router, {
    url: '/api/trpc',
    transformer: 'superjson',
  })
})

The router we import is the router taken from:

export const t = initTRPC.context<Context>().create({
  transformer: superjson,
})

export const createRouter = t.router
@thepeterkovacs
Copy link

Same problem. It seems like in the build the route.js file contains the absolute path to the bundle.js file.
A quick workaround fix is to override the path generated in the (in my case in Next.js) .next\server\app\api\trpc\panel\route.js to the correct one.
Unfortunately it has to be done for every build, so it is a major issue.

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

No branches or pull requests

2 participants