Error running gulp on Windows 10

2019-08-10 00:32发布

问题:

I'm running Windows 10 build 10576(latest) and I get an error when running gulp from my project root folder(or anywhere). Here's a screenshot of the error: http://puu.sh/l3mLf/522a4e6dbe.png Error message says "invalid character". (I've installed gulp globally) The very first line of gulp.js in the bin folder is the following:

#!/usr/bin/env node  

I didn't have this problem before and I'd really want to get this sorted out. Thanks.

回答1:

I have the same error when try running "node_modules\gulp\bin\gulp.js install".

I found the solution here at Testing out Protractor interactively

Just add "node" command in front of it will work. In my case "node node_modules\gulp\bin\gulp.js install"