Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teach gulp to give better errors on parse failures #378

Open
chadwhitacre opened this issue Dec 11, 2015 · 2 comments
Open

teach gulp to give better errors on parse failures #378

chadwhitacre opened this issue Dec 11, 2015 · 2 comments

Comments

@chadwhitacre
Copy link
Contributor

I can't tell from the following error output what file the error is in. Am I missing it or is it indeed not there?

$ node_modules/.bin/gulp
[17:45:39] Using gulpfile ~/workbench/saxifrage/learnpgh.org/gulpfile.js
[17:45:39] Starting 'default'...
[17:45:39] Starting 'js-vendors'...
[17:45:39] Starting 'js-app'...
[17:45:39] Starting 'templates'...
[17:45:39] Starting 'images'...
[17:45:39] Starting 'css-app'...
[17:45:40] Finished 'js-vendors' after 229 ms
[17:45:40] Finished 'css-app' after 280 ms

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: app.min.js: error: couldn't process source due to parse error
Unexpected token (140:23)
    at transform (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/index.js:20:11)   
    at Transform._transform (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/index.js:68:25)
    at Transform._read (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Transform.Writable.write (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-ng-annotate/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-concat/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-concat/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
    at DestroyableTransform.pipeOnReadable (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-concat/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
$ 

cf. #373

@chadwhitacre
Copy link
Contributor Author

Here's another example, this time for a stylesheet(?):

$ node_modules/.bin/gulp 
[17:48:18] Using gulpfile ~/workbench/saxifrage/learnpgh.org/gulpfile.js
[17:48:18] Starting 'default'...
[17:48:18] Starting 'js-vendors'...
[17:48:18] Starting 'js-app'...
[17:48:18] Starting 'templates'...
[17:48:18] Starting 'images'...
[17:48:18] Starting 'css-app'...

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: client/index.scss
Error: File to import not found or unreadable: ./dashboard/map/MapStyle
       Parent style sheet: stdin
        on line 24 of stdin
>> @import './dashboard/map/MapStyle';
   ^

    at options.error (/Users/whit537/workbench/saxifrage/learnpgh.org/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:277:32)
$

@chadwhitacre
Copy link
Contributor Author

Oh! There we have a filename. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant