-
Notifications
You must be signed in to change notification settings - Fork 38
TypeError: t is not a function on Windows #48
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
Comments
Ok, I created an unminified build of both miniglob and estrella. Here's the actual error: Unhandled exception: TypeError: volumeNameLen2 is not a function
at C:\[project folder]\node_modules\estrella\node_modules\miniglob\src\miniglob.js:59:18
at glob0 (C:\[project folder]\node_modules\estrella\node_modules\miniglob\src\miniglob.js:269:23)
at glob (C:\[project folder]\node_modules\estrella\node_modules\miniglob\src\miniglob.js:24:12)
at Object.<anonymous> (C:\[project folder]\transpile.js:28:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
error Command failed with exit code 2. That seems to be this bit of code: var cleanGlobPath = WIN32 ? (path, volumeNameLen2) => {
let vollen = volumeNameLen2(path); // <= Error here
if (path == "") {
return [0, "."];
}
// ...
} Which is odd. When I check the code, it looks like the non-win32 path thinks that Has this ever worked on Windows? What's the intent of this code? I'd be happy to PR back to miniglob to fix the windows path if that's helpful, just would be good to understand what that's trying to do. Also I'm happy to move this issue over to that repo, but I notice you're the same person behind both projects so I didn't want to spam you with notifications. If this is better over there just let me know. |
I've made a little more progress by editing var cleanGlobPath = WIN32 ? (path, volumeNameLen2) => {
let vollen = volumeNameLen2; This now gets me to the place where it runs, but the glob function with the pattern |
The bigger problem here is that the miniglob library does not support cross-platform glob patterns: estrella should use something that does (e.g. node-glob), as to work correctly on Windows you would have to replace all your glob patterns' slashes with backslashes, and even then I'm not sure it would work right. |
When we try to run this script:
on Windows, we get:
When we look for
C:\[project folder]\node_modules\estrella\node_modules\miniglob\src\miniglob.js
the file doesn't exist. How can we help debug this?The text was updated successfully, but these errors were encountered: