topleft topleft - 1 year ago 180
Javascript Question

Gulp command opens gulp.js in notepad instead of running it

I installed it correctly I think.

My package.json

"name": "my-project",
"version": "0.1.0",
"devDependencies": {
"gulp": "^3.8.11",
"gulp-concat": "^2.5.2"

my gulp.js

var gulp = require('gulp');

var concat = require('gulp-concat');

gulp.task('scripts', function() {
return gulp.src('js/*.js')

gulp.task('default', ['scripts']);

my folder are as follow :

ROOT/node-modules/ <-- my modules are here
ROOT/js/ <-- my js are here

When I run
in command line, being in the ROOT folder, gulp.js just opens in windows notepad and that's all..

Why is it doing that?

Also this might be terribly stupid from me but I'm not actually running a local server. I don't have wamp installed on this computer. Just figured it might be a problem for node.js

Answer Source

problem solved by a simple action: renaming gulp.js to gulpfile.js (sigh..)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download