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

outDir option that has 2 depth throws ENAMETOOLONG error #3173

Closed
6 tasks done
ravieeeee opened this issue Apr 27, 2021 · 1 comment
Closed
6 tasks done

outDir option that has 2 depth throws ENAMETOOLONG error #3173

ravieeeee opened this issue Apr 27, 2021 · 1 comment

Comments

@ravieeeee
Copy link

ravieeeee commented Apr 27, 2021

Describe the bug

outDir option that has 2 depth throws ENAMETOOLONG error.

// vite.config.js
build: {
  outDir: 'public/build',
}
ENAMETOOLONG: name too long, mkdir '/vite-project-name/public/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build/build'

Reproduction

$ vite build

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 11.31 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.14.0 - ~/.asdf/installs/nodejs/12.14.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.asdf/installs/nodejs/12.14.0/bin/npm
  Browsers:
    Chrome: 90.0.4430.93
    Chrome Canary: 92.0.4489.0
    Firefox: 86.0.1
    Safari: 14.0
  npmPackages:
    vite: ^2.2.3 => 2.2.3

Used package manager: npm

Logs


Before submitting the issue, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Provide a description in this issue that describes the bug.
  • Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
@patak-dev
Copy link
Member

patak-dev commented May 2, 2021

@ravieeeee this is failing because the public dir and the out dir are the same. If you want to use public/build, the publicDir needs to be changed to another directory (or disabled, that is a feature that will be added soon)

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

No branches or pull requests

2 participants