johnthethird / react-starter-template

React (reactjs), Gulp, Webpack, Bootstrap, LiveReload, all tied up in a bow.
MIT License
176 stars 31 forks source link

gulp dev produce error: unexpected token ILLEGAL #2

Open mlusetti opened 10 years ago

mlusetti commented 10 years ago

Thanks for putting this together.

BTW running gulp dev produce this output:

$ gulp dev
[gulp] gulp version mismatch:
[gulp] Running gulp is 3.5.0
[gulp] Local gulp (installed in gulpfile dir) is 3.3.4
[gulp] Using file /home/mlusetti/workspaces/ReactJS/react-starter-template/gulpfile.js
[gulp] Working directory changed to /home/mlusetti/workspaces/ReactJS/react-starter-template

/home/mlusetti/workspaces/ReactJS/react-starter-template/gulpfile.coffee:13
#
^
SyntaxError: Unexpected token ILLEGAL
  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> (/home/mlusetti/workspaces/ReactJS/react-starter-template/gulpfile.js:3:1)
  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 loadGulpFile (/usr/lib/node_modules/gulp/bin/gulp.js:125:21)
  at Object.<anonymous> (/usr/lib/node_modules/gulp/bin/gulp.js:80:1)
  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 Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:902:3
Xs-and-10s commented 10 years ago

found a solution that worked for me:

in gulp.js, change the require('coffee-script') to require('coffee-script/register'); *(I also upgraded gulp to 3.5.2, and had to install 'gulp-util')

here's the recipe I followed: https://github.com/gulpjs/gulp/blob/master/docs/recipes/using-coffee-script-for-gulpfile.md

osblinnikov commented 10 years ago

Thank you MarkManley3, this worked for me!