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

Vite error: "vue.js.map is outside of Vite serving allow list" if project path contains spaces #5194

Closed
7 tasks done
aleksey-hoffman opened this issue Oct 4, 2021 · 2 comments

Comments

@aleksey-hoffman
Copy link

aleksey-hoffman commented Oct 4, 2021

Describe the bug

Getting the error shown below on launch.
I found the cause - it happens if the project path contains spaces. Not sure how to resolve the issue though. I guess Vite cannot resolve non-encoded URLs containing characters like %20

Error:

[vite] Internal server error: The request url "E:/vite%20electron/vite-electron-builder/node_modules/.vite/vue.js.map" is outside of Vite serving allow list:

- /E:/vite electron/vite-electron-builder

Refer to docs https://vitejs.dev/config/#server-fs-allow for configurations and more details.
      at ensureServingAccess (E:\vite electron\vite-electron-builder\node_modules\vite\dist\node\chunks\dep-24231913.js:64798:15)
      at viteServeRawFsMiddleware (E:\vite electron\vite-electron-builder\node_modules\vite\dist\node\chunks\dep-24231913.js:64765:13)
      at call (E:\vite electron\vite-electron-builder\node_modules\vite\dist\node\chunks\dep-24231913.js:53749:7)
      at next (E:\vite electron\vite-electron-builder\node_modules\vite\dist\node\chunks\dep-24231913.js:53693:5)
      at viteTransformMiddleware (E:\vite electron\vite-electron-builder\node_modules\vite\dist\node\chunks\dep-24231913.js:65004:28)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)

Reproduction

Clone repo to path containing spaces:

  1. git clone https://github.com/cawa-93/vite-electron-builder.git
  2. cd "vite-electron-builder"
  3. npm install
  4. npm run watch

System Info

- OS: Windows 10
- Node: 14.18.0
- Vite: 2.6.2

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

related: vitejs/vite-plugin-vue#218

@sapphi-red
Copy link
Member

I tested this with Vite 3.0.9 and it seems to work.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants