remix-run / remix

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

Error: No route matches URL "/cart.json" #9448

Closed NinjaLukeI closed 1 month ago

NinjaLukeI commented 1 month ago

Reproduction

My vite.config.ts looks like this:

import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { defineConfig } from "vite";
import { vercelPreset } from '@vercel/remix/vite';
import tsconfigPaths from "vite-tsconfig-paths";

installGlobals();

export default defineConfig({
  plugins: [remix({ presets: [vercelPreset()] }), tsconfigPaths()],
});

My package.json looks like this:

{
  "name": "",
  "private": true,
  "sideEffects": false,
  "type": "module",
  "scripts": {
    "build": "remix vite:build",
    "dev": "remix vite:dev",
    "typecheck": "tsc"
  },
  "dependencies": {
    "@hookform/resolvers": "^3.3.4",
    "@radix-ui/react-avatar": "^1.0.4",
    "@radix-ui/react-checkbox": "^1.0.4",
    "@radix-ui/react-label": "^2.0.2",
    "@radix-ui/react-separator": "^1.0.3",
    "@radix-ui/react-slot": "^1.0.2",
    "@radix-ui/react-toggle": "^1.0.3",
    "@radix-ui/react-toggle-group": "^1.0.4",
    "@remix-run/node": "^2.9.2",
    "@remix-run/react": "^2.9.2",
    "@remix-run/server-runtime": "^2.9.2",
    "@vercel/analytics": "^1.2.2",
    "@vercel/remix": "2.9.2-patch.2",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "isbot": "^4",
    "lucide-react": "^0.378.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-hook-form": "^7.51.4",
    "tailwind-merge": "^2.3.0",
    "tailwindcss-animate": "^1.0.7",
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@remix-run/dev": "^2.9.2",
    "@remix-run/eslint-config": "^2.9.2",
    "@types/react": "^18.2.20",
    "@types/react-dom": "^18.2.7",
    "autoprefixer": "^10.4.19",
    "eslint": "^8.38.0",
    "postcss": "^8.4.38",
    "tailwindcss": "^3.4.3",
    "typescript": "^5.1.6",
    "vite": "^5.1.0",
    "vite-tsconfig-paths": "^4.2.1"
  },
  "engines": {
    "node": ">=18.0.0"
  }
}

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 1600X Six-Core Processor
    Memory: 2.03 GB / 15.93 GB
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.7.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    @remix-run/dev: ^2.9.2 => 2.9.2
    @remix-run/eslint-config: ^2.9.2 => 2.9.2
    @remix-run/node: ^2.9.2 => 2.9.2
    @remix-run/react: ^2.9.2 => 2.9.2
    @remix-run/server-runtime: ^2.9.2 => 2.9.2
    vite: ^5.1.0 => 5.2.11

Used Package Manager

npm

Expected Behavior

I shouldn't be receiving any errors in the console.

Actual Behavior

I keep getting this error about /cart.json but I can't see any reference to it in my code so I don't get where it's coming from. I've installed remix using the vercel template, and the remix instructions but it keeps coming up. There isn't a route matching that name either.

No routes matched location "/cart.json" 
ErrorResponseImpl {
  status: 404,
  statusText: 'Not Found',
  internal: true,
  data: 'Error: No route matches URL "/cart.json"',
  error: Error: No route matches URL "/cart.json"
      at getInternalRouterError (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\router\dist\router.cjs.js:4676:59)
      at Object.query (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\router\dist\router.cjs.js:3394:19)
      at handleDocumentRequest (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\server-runtime\dist\server.js:223:35)
      at requestHandler (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\server-runtime\dist\server.js:142:24)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async nodeHandler (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\dev\dist\vite\plugin.js:841:27)
      at async F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\dev\dist\vite\plugin.js:844:15
}
Error: No route matches URL "/cart.json"
    at getInternalRouterError (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\router\dist\router.cjs.js:4676:59)
    at Object.query (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\router\dist\router.cjs.js:3394:19)
    at handleDocumentRequest (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\server-runtime\dist\server.js:223:35)
    at requestHandler (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\server-runtime\dist\server.js:142:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async nodeHandler (F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\dev\dist\vite\plugin.js:841:27)
    at async F:\Users\Luke_\Documents\work\morby-vercel-dep\node_modules\@remix-run\dev\dist\vite\plugin.js:844:15
kiliman commented 1 month ago

Odd. Do you have any other browser tabs open? Browser extensions? Background processes?

Try rebooting to see if it stops.

NinjaLukeI commented 1 month ago

Thank you so much lol, it was the helium 10 extension causing this. It was searching for a /cart.json and when I disabled it it stopped. Cheers.