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

"No match found for location with path" is still spammed on unknown paths #26947

Open
PierreSchwang opened this issue Apr 25, 2024 · 10 comments
Open

Comments

@PierreSchwang
Copy link

Environment

Basically everywhere, on my windows development machine:

------------------------------
- Operating System: Windows_NT
- Node Version:     v18.15.0
- Nuxt Version:     3.11.2
- CLI Version:      3.11.1
- Nitro Version:    -
- Package Manager:  yarn@3.7.0
- Builder:          -
- User Config:      devtools, css, devServer, modules, runtimeConfig, sitemap, image, i18n
- Runtime Modules:  nuxt-particles@0.3.0, @nuxtjs/i18n@8.3.1, @nuxtjs/sitemap@5.1.4
- Build Modules:    -
------------------------------

And in the production docker image using node-20 / node-21 alpine where I can only provide the nitro.json:

{
  "date": "2024-04-25T10:18:46.878Z",
  "preset": "node-server",
  "framework": {
    "name": "nuxt",
    "version": "3.11.2"
  },
  "versions": {
    "nitro": "2.9.6"
  },
  "commands": {
    "preview": "node ./server/index.mjs"
  }
}
/app/.output # node -v
v21.7.3

Reproduction

Basically a new project from the template using the vue-router and a page, but for the sake of simplicity:
https://stackblitz.com/edit/github-hmpfds?file=app.vue

Describe the bug

Relates #26425 + #26519

If I understood correctly the issue should be resolved by using the latest nuxt build, but doesn't seem to: When visiting an unknown route - even if having an error.vue in root - the message [Vue Router warn]: No match found for location with path is printed several times (I couldn't find a correlation between the amount of pages and log entries, sometimes it seems to be 4 times, other times it's about 15x). That happens in the development environment, and in the production build.

Additional context

The Dockerfile building the production image:

FROM node:21 AS builder

WORKDIR /app

COPY package.json /app
COPY yarn.lock /app
COPY .yarnrc.yml /app
RUN yarn set version stable ; yarn set version 3.x
RUN yarn install
ADD . /app
RUN yarn build

FROM node:21-alpine

WORKDIR /app
COPY --from=builder /app/.output /app/.output

EXPOSE 3000

ENTRYPOINT ["node", ".output/server/index.mjs"]

Logs

The part of the example log from production where some crawlers try to find security issues:

[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/plugins/wp-automatic/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-admin/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/wp-content/themes/twentytwentytwo/inputs.php"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/.env"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
[Vue Router warn]: No match found for location with path "/wp-content/themes/rehub-theme/icons/modulobox.svg"
Copy link

stackblitz bot commented Apr 25, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@ChinDer
Copy link

ChinDer commented May 6, 2024

I'm having this problem too.

@danielroe
Copy link
Member

I will investigate this. For now, you can try working around the issue in production by explicitly setting NODE_ENV=production when running your app.

@roaa-alrajabi
Copy link

We are having this issue on production as well, not just on dev environment

@tymon42

This comment was marked as duplicate.

Copy link
Member

If you are having the problem on production, even with explicitly setting NODE_ENV, would you please provide a reproduction? 🙏

@husayt
Copy link
Contributor

husayt commented Jun 11, 2024

I get this problem when switching compatibilityVersion: 4, with nuxt 3.12.1 on windows

@rylanharper
Copy link

rylanharper commented Jun 11, 2024

I'm getting the same issue on my Nuxt sites using the Shopify Graphql API (using the Nuxt GraphQL Client module) upon upgrading to Nuxt ^3.12.1. I get the same [Vue Router warn] error messages shown above when navigating to each route (except pointing to my graphql client when referencing the "location"). I also see I have the following warning as well:

plugin.mjs:8 [nuxt] Could not access `graphql-client`. The only available runtime config keys on the client side are `public` and `app`. See `https://nuxt.com/docs/guide/going-further/runtime-config` for more information.`

@toniengelhardt
Copy link
Contributor

Also seeing this in v3.12.1.

Not sure if related, but I'm using public runtime config var for the URLs like

<NuxtLink :to="$config.public.urls.docsUrl">Docs</NuxtLink>

@danielroe
Copy link
Member

The issue in v3.12.1 is hopefully resolved in #27487 and should be in the next patch.

Workaround for prod apps:

For now, you can try working around the issue in production by explicitly setting NODE_ENV=production when running your app.

@danielroe danielroe removed the 3.x label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants