remix-run / remix

Build Better Websites. Create modern, resilient user experiences with web fundamentals.
https://remix.run
MIT License
29.73k stars 2.5k forks source link

No route matches URL "/null" #10108

Open arnaudambro opened 6 days ago

arnaudambro commented 6 days ago

Reproduction

the error is

ErrorResponseImpl {
  status: 404,
  statusText: 'Not Found',
  internal: true,
  data: 'Error: No route matches URL "/null"',
  error: Error: No route matches URL "/null"
      at getInternalRouterError (/node_modules/@remix-run/router/dist/router.cjs.js:5192:59)
      at Object.query (/node_modules/@remix-run/router/dist/router.cjs.js:3777:19)
      at handleDocumentRequest (/node_modules/@remix-run/server-runtime/dist/server.js:275:35)
      at requestHandler (/node_modules/@remix-run/server-runtime/dist/server.js:160:24)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async nodeHandler (/node_modules/@remix-run/dev/dist/vite/plugin.js:839:27)
      at async /node_modules/@remix-run/dev/dist/vite/plugin.js:842:15
}
No routes matched location "/null"
DOMException [AbortError]: This operation was aborted
    at new DOMException (node:internal/per_context/domexception:53:5)
    at AbortController.abort (node:internal/abort_controller:392:18)
    at ServerResponse.<anonymous> (/node_modules/@remix-run/dev/dist/vite/node-adapter.js:61:97)
    at ServerResponse.emit (node:events:518:28)
    at ServerResponse.emit (node:domain:488:12)
    at emitCloseNT (node:_http_server:1023:10)
    at Socket.onServerResponseClose (node:_http_server:278:5)
    at Socket.emit (node:events:530:35)
    at Socket.emit (node:domain:488:12)
    at TCP.<anonymous> (node:net:337:12)

I could give a full repo but maybe it's useless and the hierarchy tree is enough to spot the bug - in file naming ?

┣ 📂components
┣ 📂data
┣ 📂db
┃ ┗ 📜prisma.server.ts
┣ 📂icons
┣ 📂routes
┃ ┣ 📜_home._feed._index.tsx
┃ ┣ 📜_home._feed.new-post.tsx
┃ ┣ 📜_home._feed.tsx
┃ ┣ 📜_home.tsx
┃ ┣ 📜_home.users.tsx
┃ ┣ 📜action.push-register.jsx
┃ ┣ 📜actions.logout.jsx
┃ ┣ 📜actions.post-actions.ts
┃ ┣ 📜actions.user-follow.tsx
┃ ┣ 📜actions.user-search.tsx
┃ ┣ 📜health.tsx
┃ ┣ 📜loaders.posts-get.tsx
┃ ┣ 📜profile.$id._index.tsx
┃ ┣ 📜profile.$id.edit.tsx
┃ ┣ 📜profile.$id.feed.tsx
┃ ┣ 📜profile.$id.followers.tsx
┃ ┣ 📜profile.$id.subscriptions.tsx
┃ ┣ 📜profile.tsx
┃ ┣ 📜welcome._index.jsx
┃ ┣ 📜welcome.login-profile.tsx
┃ ┣ 📜welcome.login-redirect.jsx
┃ ┣ 📜welcome.magic-otp.tsx
┃ ┣ 📜welcome.magic.tsx
┃ ┗ 📜welcome.tsx
┣ 📂services
┣ 📂styles
┣ 📂utils
┣ 📜config.js
┣ 📜entry.client.jsx
┣ 📜entry.server.tsx
┗ 📜root.tsx

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M1
    Memory: 112.14 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/Library/Caches/fnm_multishells/47472_1728483170366/bin/node
    Yarn: 4.4.1 - ~/Library/Caches/fnm_multishells/47472_1728483170366/bin/yarn
    npm: 10.2.4 - ~/Library/Caches/fnm_multishells/47472_1728483170366/bin/npm
    bun: 1.0.0 - /opt/homebrew/bin/bun
    Watchman: 2023.08.28.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 126.1.67.119
    Chrome: 129.0.6668.100
    Edge: 124.0.2478.97
    Safari: 17.6
  npmPackages:
    @remix-run/dev: ^2.13.1 => 2.13.1
    @remix-run/eslint-config: ^2.13.1 => 2.13.1
    @remix-run/node: ^2.13.1 => 2.13.1
    @remix-run/react: ^2.13.1 => 2.13.1
    @remix-run/serve: ^2.13.1 => 2.13.1
    vite: ^5.0.0 => 5.4.8

Used Package Manager

npm

Expected Behavior

this error shouldn't happen

Actual Behavior

this error happens

brophdawg11 commented 5 days ago

What route do you expect to match /null?

victorlunam commented 2 days ago

@arnaudambro have you defined the route “_index.tsx”?