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

Gulp CLI fails with Windows Extended-Length Path #200

Closed
charlespierce opened this issue Oct 29, 2019 · 0 comments · Fixed by #201
Closed

Gulp CLI fails with Windows Extended-Length Path #200

charlespierce opened this issue Oct 29, 2019 · 0 comments · Fixed by #201

Comments

@charlespierce
Copy link
Contributor

If Gulp is invoked with a Windows Extended-Length Path, then it immediately fails with an ENOENT error:

> node \\?\C:\Users\chuck\github\gulp-cli\bin\gulp.js -v
internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, scandir '\\?\C:\Users\chuck\github\gulp-cli/lib/versioned/'
    at Object.readdirSync (fs.js:854:3)
    at Object.<anonymous> (\\?\C:\Users\chuck\github\gulp-cli\index.js:31:17)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (\\?\C:\Users\chuck\github\gulp-cli\bin\gulp.js:5:1)
    at Module._compile (internal/modules/cjs/loader.js:956:30) {
  errno: -4058,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '\\\\?\\C:\\Users\\chuck\\github\\gulp-cli/lib/versioned/'
}

This appears to be because a path is created using simple string concatenation, instead of path.join() in this file. Unlike normal paths, extended-length paths in Windows don't support / as a separator, so the resulting string is an invalid path when __dirname is an extended-length path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant