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

[Bug report] File access restriction of Vite 2.3 #134

Closed
davay42 opened this issue May 11, 2021 · 3 comments
Closed

[Bug report] File access restriction of Vite 2.3 #134

davay42 opened this issue May 11, 2021 · 3 comments
Labels
bug Something isn't working package:bundler-vite

Comments

@davay42
Copy link

davay42 commented May 11, 2021

I've got this server error with a fresh new vuepress install

23:12:36 [vite] Internal server error: 
The request url "/Users/Davay/Documents/ФРУКТ/Axioma/axioma.center/node_modules/.pnpm/@[email protected]/node_modules/@vuepress/client/lib/app.js" 
is outside of vite dev server root "/Users/Davay/Documents/ФРУКТ/Axioma/axioma.center". 

Notice it has ФРУКТ in the first path and ФРУКТ in the second.

Environment info

  • Output of vuepress info:
System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 768.96 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.16.1 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 7.8.0 - /usr/local/bin/npm
  Utilities:
    Git: 2.21.1 - /usr/bin/git
  Browsers:
    Chrome: 90.0.4430.212
    Edge: Not Found
    Firefox: 88.0
    Safari: 14.1
  npmPackages:
    @vuepress/bundler-vite: Not Found
    @vuepress/bundler-webpack: Not Found
    @vuepress/cli: Not Found
    @vuepress/client: Not Found
    @vuepress/core: Not Found
    @vuepress/markdown: Not Found
    @vuepress/plugin-active-header-links: Not Found
    @vuepress/plugin-back-to-top: Not Found
    @vuepress/plugin-container: Not Found
    @vuepress/plugin-debug: Not Found
    @vuepress/plugin-docsearch: Not Found
    @vuepress/plugin-git: Not Found
    @vuepress/plugin-google-analytics: Not Found
    @vuepress/plugin-medium-zoom: Not Found
    @vuepress/plugin-nprogress: Not Found
    @vuepress/plugin-palette: Not Found
    @vuepress/plugin-prismjs: Not Found
    @vuepress/plugin-pwa: Not Found
    @vuepress/plugin-pwa-popup: Not Found
    @vuepress/plugin-register-components: Not Found
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data: Not Found
    @vuepress/plugin-toc: Not Found
    @vuepress/shared: Not Found
    @vuepress/theme-default: Not Found
    @vuepress/theme-vue: Not Found
    @vuepress/utils: Not Found
    vue: Not Found
    vue-loader: Not Found
    vue-router: Not Found
    vuepress: Not Found
    vuepress-vite: ^2.0.0-beta.13 => 2.0.0-beta.13 
@meteorlxy
Copy link
Member

meteorlxy commented May 12, 2021

I think it's not related to the non-ascii characters. It should be caused by the security update of vite 2.3.0.

Try following snippet:

module.exports = {
  bundlerConfig: {
	viteOptions: {
      server: {
        fsServe: {
          root: process.cwd(),
        },
      },
	},
  },
}

@meteorlxy
Copy link
Member

meteorlxy commented May 12, 2021

If you meet issue pf pnpm compatibility, try adding shamefully-hoist=true in the .npmrc file of your project, and re-install deps with pnpm.

See https://pnpm.io/npmrc#shamefully-hoist

@meteorlxy meteorlxy added bug Something isn't working package:bundler-vite labels May 12, 2021
@meteorlxy
Copy link
Member

vitejs/vite#3373

@meteorlxy meteorlxy changed the title [Bug report] Server error when path contains cyrillic characters [Bug report] File access resctriction of Vite 2.3 May 12, 2021
@meteorlxy meteorlxy changed the title [Bug report] File access resctriction of Vite 2.3 [Bug report] File access restriction of Vite 2.3 May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package:bundler-vite
Projects
None yet
Development

No branches or pull requests

2 participants