You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run npm run dev / npm run build from inside a symlinked directory on windows, but it fails with the error:
[vite:build-html] The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "E:/Dev/Personal/Sandbox/symlinked/index.html".
The original dir is inside my E: drive, and the symlinked dir is inside the C: drive.
Both create-react-app and create-next-app work flawlessly from inside the symlinked directory.
> symlinked@0.0.0 build
> tsc && vite build
vite v3.2.4 building for production...
✓ 34 modules transformed.
rendering chunks (1)...[vite:build-html] The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "E:/Dev/Personal/Sandbox/symlinked/index.html".
error during build:
Error: The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "E:/Dev/Personal/Sandbox/symlinked/index.html".
at error (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at FileEmitter.emitFile (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/rollup/dist/es/shared/rollup.js:22335:24)
at Object.generateBundle (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:43019:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Bundle.generate (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/rollup/dist/es/shared/rollup.js:15796:9)
at async file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/rollup/dist/es/shared/rollup.js:23795:27
at async catchUnfinishedHookActions (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/rollup/dist/es/shared/rollup.js:23126:20)
at async doBuild (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45409:22)
at async build (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:45237:16)
at async CAC.<anonymous> (file:///E:/Dev/Personal/Sandbox/symlinked/node_modules/vite/dist/node/cli.js:756:9)
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
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 vuejs/core instead.
Describe the bug
I am trying to run
npm run dev
/npm run build
from inside a symlinked directory on windows, but it fails with the error:[vite:build-html] The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "E:/Dev/Personal/Sandbox/symlinked/index.html".
The original dir is inside my E: drive, and the symlinked dir is inside the C: drive.
Both create-react-app and create-next-app work flawlessly from inside the symlinked directory.
Reproduction
https://stackblitz.com/edit/vitejs-vite-pf6j6s?file=index.html&terminal=dev
Steps to reproduce
mklink /d "C:\symlinked_directory" "E:\directory"
npm create vite@latest
, select React and Typescriptnpm i
thennpm run build
System Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: