{"id":550,"hash":"689d0aab2ea4c81d535c279fc8e3ea0d5c955e1bc730192c354125586e264766","pattern":"Error: `The request url * is outside of Vite serving allow list` after git init of submodule inside pnpm monorepo workspace","full_message":"I have setup a pnpm workspace with a number of projects that I am adding as git submodules.\n\nA previously working Nuxt project suddenly started giving the error The request url * is outside of Vite serving allow list for multiple files, including dependencies installed as pnpm modules inside the workspace node_modules folder.\n\nThe only change had been to initialise my project as a git repository.\n\nI was expecting the dev server to keep working, and that changes to git would not have any effect.\n\nThe project still builds ok.","ecosystem":"npm","package_name":"nuxt.js","package_version":null,"solution":"Vite uses \"auto workspace root detection\" to figure out where your project root is.\n\nWithin a pnpm workspace your project's node_modules will be installed at the root of the workspace and not within your project folder.\n\nAs soon as you initialise a git repository for your project within the workspace then vite seems to auto detect this as your project root and not the workspace (which I'm presuming is initialised as a git repo which you are adding submodules to).\n\nThe solution is to specify the pnpm workspace as an allowed directory for the vite server\n\nexport default defineNuxtConfig({\n    vite: {\n        server: {\n            fs: {\n                allow: [\"/home/user/Monorepo\"]\n            }\n        }\n    }\n})\n\nvite: server-fs-allow","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/74902697/error-the-request-url-is-outside-of-vite-serving-allow-list-after-git-init","votes":19,"created_at":"2026-04-19T04:51:19.434593+00:00","updated_at":"2026-04-19T04:51:19.434593+00:00"}