Debugging Gulp fails in Chrome

82 views
Skip to first unread message

rej...@gmail.com

unread,
Oct 26, 2018, 10:12:49 PM10/26/18
to nodejs
Hi,
I have followed the article (https://stackoverflow.com/questions/40033298/how-to-debug-a-gulp-task) to debug gulp file using chrome. My gulpfile.js looks like this:
var gulp = require('gulp');
// Gulp 4
debugger;
gulp.task('cleanTemp', function (done) {
console.log('Hello world!');
done();
});

When I execute the command from my working folder:
node --inspect-brk ./node_modules/gulp/node_modules/.bin/gulp cleanTemp

I am getting an error:
Debugger attached.
C:\Workspace\Projects\Eclipse\CommsProc\Source\HttpServer\node_modules\gulp\node_modules\.bin\gulp:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
Waiting for the debugger to disconnect...

What am I doing wrong. What does this message mean: basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

Kind Regards,
Janusz

Rashik Ansar Shaik

unread,
Oct 28, 2018, 1:16:52 PM10/28/18
to nod...@googlegroups.com
i think its __dirname 

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/1c0087ea-0832-44c4-8ddb-d1a2b3c2d167%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--


rej...@gmail.com

unread,
Nov 1, 2018, 2:07:43 AM11/1/18
to nodejs
Yeah. But what about dirname. Any solution?

Kind Regards,
Janusz
Reply all
Reply to author
Forward
0 new messages