jdx / mean-sample

Sample project for Write Modern Web Apps with the MEAN Stack by Jeff Dickey
https://mean-sample.herokuapp.com
166 stars 90 forks source link

Having problems building Sample 6 #46

Closed athompson887 closed 8 years ago

athompson887 commented 8 years ago

After working through the code and getting this error I have tried it against the source from Git hub (zip). After running npm update and starting with gulp dev I get this error. Can anyone advise please.

SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:414:25) at Object.Module._extensions..js (module.js:442:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:313:12) at Module.require (module.js:366:17) at require (module.js:385:17) at /Users/andrewthompson/Desktop/Mean/mean-sample-ch6/gulpfile.js:4:3 at Array.forEach (native) at Object. (/Users/andrewthompson/Desktop/Mean/mean-sample-ch6/gulpfile.js:3:37)

athompson887 commented 8 years ago

my problem was due to the .DSStore files which are in every file in Mac OSX. I fixed this by adding a testin the for each loop

fs.readdirSync(__dirname + '/gulp').forEach(function (task){ if(task!=='.DS_Store') require('./gulp/' + task) }) I am not convinced this is the best solution but it helped me move on