I am building a gulpfile to use in my aps.net winforms project. So far I have the following in the package.json
{
"version": "1.0.0",
"name": "asp.net",
"private": true,
"devDependencies": {
"browserify": "^13.1.0",
"del": "2.2.0",
"gulp": "^3.9.1",
"gulp-sourcemaps": "^2.2.0",
"gulp-typescript": "^3.0.2",
"tsify": "^2.0.2",
"vinyl-source-stream": "^1.1.0"
}
}
and the gulp file has
/// <binding BeforeBuild='default' />
/*
This file in the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007
*/
var gulp = require('gulp');
var del = require('del');
var ts = require("gulp-typescript");
var tsProject = ts.createProject("tsconfig.json");
var sourcemaps = require('gulp-sourcemaps');
gulp.task('default', function () {
// place code for your default task here
});
My node version is 6.9.1
If I run this from the command line ('gulp') it works fine. But in the Visual Studio task runner, it fails to load, and in the out put I see the following error. This error starts after I add the line var sourcemaps = require('gulp-sourcemaps');
Failed to run "H:\dev\myproj\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
H:\dev\myproj\node_modules\gulp-sourcemaps\node_modules\strip-bom\index.js:2
module.exports = x => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (H:\dev\myproj\node_modules\gulp-sourcemaps\src\init.js:10:14)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
Also adding var tsify = require("tsify");
I get another error...
Failed to run "H:\dev\myproject\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
TypeError: Object #<Object> has no method 'debuglog'
at Object.<anonymous> (H:\dev\myproject\node_modules\tsify\index.js:4:32)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (H:\dev\myproject\gulpfile.js:17:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Anyone have any ideas why I am getting this?
Thanks in advance!