-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
--gulpfile failed on Windows in Node v0.11.13 #664
Comments
Can you show your gulpfile and your log? |
This is my gulpfile.js: var gulp = require('gulp');
var clean = require('gulp-clean');
var gutil = require('gulp-util');
var paths = {
ext_core: [
'core/bin/core.dev.js',
'core/bin/core.min.js',
],
ext_engine: [
'engine/bin/engine.dev.js',
'engine/bin/engine.min.js',
],
ext_editor_ui: [
'editor-ui/bin/editor-ui.css',
'editor-ui/bin/editor-ui.html',
'editor-ui/bin/img/**/*.png',
],
ext_editor: [
'editor/bin/editor.html',
'editor/bin/editor.dev.js',
'editor/bin/editor.min.js',
],
editor_misc: [
'editor/favicon.ico',
'editor/index.html',
],
};
/////////////////////////////////////////////////////////////////////////////
// copy
/////////////////////////////////////////////////////////////////////////////
gulp.task('cp-core', function() {
return gulp.src(paths.ext_core)
.pipe(gulp.dest('bin/ext/fire-core'))
;
});
gulp.task('cp-engine', function() {
return gulp.src(paths.ext_engine)
.pipe(gulp.dest('bin/ext/fire-engine'))
;
});
gulp.task('cp-editor-ui', function() {
return gulp.src(paths.ext_editor_ui)
.pipe(gulp.dest('bin/ext/fire-editor-ui'))
;
});
gulp.task('cp-editor', function() {
return gulp.src(paths.ext_editor)
.pipe(gulp.dest('bin/ext/fire-editor'))
;
});
gulp.task('cp-misc', function() {
return gulp.src(paths.editor_misc)
.pipe(gulp.dest('bin/'))
;
});
/////////////////////////////////////////////////////////////////////////////
// clean
/////////////////////////////////////////////////////////////////////////////
gulp.task('clean', function() {
var files = [
'bin/package.json',
'bin/bower.json',
'bin/favicon.ico',
'bin/index.html',
'bin/ext/fire-core/**/*',
'bin/ext/fire-engine/**/*',
'bin/ext/fire-editor-ui/**/*',
'bin/ext/fire-editor/**/*',
];
return gulp.src(files, {read: false})
.pipe(clean({force: true}))
;
});
/////////////////////////////////////////////////////////////////////////////
// tasks
/////////////////////////////////////////////////////////////////////////////
gulp.task('copy', [
'cp-core',
'cp-engine',
'cp-editor',
'cp-editor-ui',
'cp-misc',
] );
gulp.task('default', ['copy'] );
gulp.task('watch', function() {
gulp.watch(paths.ext_core, ['cp-core']).on ( 'error', gutil.log );
gulp.watch(paths.ext_engine, ['cp-engine']).on ( 'error', gutil.log );
gulp.watch(paths.ext_editor_ui, ['cp-editor-ui']).on ( 'error', gutil.log );
gulp.watch(paths.ext_editor, ['cp-editor']).on ( 'error', gutil.log );
}); The log is just:
My command:
|
So you can see in your log
Which means the A bug in liftoff on node 0.11? cc @tkellen |
I updated my last comment, here gulpfile.js means mygulp.js. I can rename it and here is the log:
My command:
|
To make things clear, in Windows, with Node v0.11.13, if I running
But if I just run |
@jwu Okay so it isn't the flag that is being ignored |
Confirmed bug in Liftoff. I'll have a fix out as soon as I can. |
As a workaround, use lowercased drive letter: |
Can you run |
pinging @tkellen for an update based on last comment. |
Looking into this again now. |
Sorry, haven't had time to look at this yet :/. I'm going to need to download a windows vm to fix this, it seems. |
If you put a I believe this has something to do with filename casing and the require cache, the gulp singleton in the gulpfile does not match the gulp singleton in the cli. I can find a way to fix this, but I think gulpfiles should export their configuration--this global singleton business has always rubbed me the wrong way (#331) |
Here is the real root cause: browserify/resolve#61 |
Dug into this a little more. |
Poking around in the repl, I might have found a solution. The var mod = require('module');
var file = mod._findPath('test/gulpfile.js', ['../gulp-cli']);
//=> '/Users/phated/gulp-cli/test/gulpfile.js' This shouldn't be calling into What I really want to know is why they added the |
Another issue to reference nodejs/node-v0.x-archive#7799 |
This seems to work with node 0.12.0. @jwu Can you confirm? |
I've test node v0.12.0 + gulp latest in Windows. It works! The issue can be closed :) |
Thanks heavens. |
When I using gulp on Windows platform with Node v0.11.13 and running command:
It will report error:
Task 'default' is not in your gulpfile.
However I have default task define on it. Mac/Linux platform are OK. And if I change my node to v0.10 on Windows, it also successfully running.
So I guess the gulp --gulpfile failed on Windows in Node v0.11.13
The text was updated successfully, but these errors were encountered: