We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ada7cd5 commit 965839cCopy full SHA for 965839c
packages/vite/src/node/utils.ts
@@ -586,6 +586,13 @@ function windowsSafeRealPathSync(path: string): string {
586
}
587
588
function optimizeSafeRealPathSync() {
589
+ // Skip if using Node <16.18 due to MAX_PATH issue: https://github.com/vitejs/vite/issues/12931
590
+ const nodeVersion = process.versions.node.split('.').map(Number)
591
+ if (nodeVersion[0] < 16 || (nodeVersion[0] === 16 && nodeVersion[1] < 18)) {
592
+ safeRealpathSync = fs.realpathSync
593
+ return
594
+ }
595
+
596
exec('net use', (error, stdout) => {
597
if (error) return
598
const lines = stdout.split('\n')
0 commit comments