{"action":"created","issue":{"url":"https://api.github.com/repos/gruntjs/grunt-contrib-less/issues/329","repository_url":"https://api.github.com/repos/gruntjs/grunt-contrib-less","labels_url":"https://api.github.com/repos/gruntjs/grunt-contrib-less/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/gruntjs/grunt-contrib-less/issues/329/comments","events_url":"https://api.github.com/repos/gruntjs/grunt-contrib-less/issues/329/events","html_url":"https://github.com/gruntjs/grunt-contrib-less/issues/329","id":192011076,"number":329,"title":"UnhandledPromiseRejectionWarning crashes Grunt watch","user":{"login":"krnlde","id":1087002,"avatar_url":"https://avatars.githubusercontent.com/u/1087002?v=3","gravatar_id":"","url":"https://api.github.com/users/krnlde","html_url":"https://github.com/krnlde","followers_url":"https://api.github.com/users/krnlde/followers","following_url":"https://api.github.com/users/krnlde/following{/other_user}","gists_url":"https://api.github.com/users/krnlde/gists{/gist_id}","starred_url":"https://api.github.com/users/krnlde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnlde/subscriptions","organizations_url":"https://api.github.com/users/krnlde/orgs","repos_url":"https://api.github.com/users/krnlde/repos","events_url":"https://api.github.com/users/krnlde/events{/privacy}","received_events_url":"https://api.github.com/users/krnlde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-28T13:52:20Z","updated_at":"2016-11-29T08:53:55Z","closed_at":null,"body":"Grunt is crashing when having a less syntax error. The syntax error itself is handled correctly, and a growl notification is properly shown. After that a wild UnhandledPromiseRejectionWarning appears and crashes the Grunt watch task unrecoverably. The output for that is:\r\n\r\n```\r\n>> File \"assets\\less\\project\\thumbnails.less\" changed.\r\n\r\nRunning \"less:dev\" (less) task\r\n>> NameError: variable @i-am-not-defined is undefined in assets\\less\\project\\thumbnails.less on line 6, column 16: >> 5    width: 400px;\r\n>> 6    margin-right: @i-am-not-defined;\r\n>> 7 }\r\nWarning: Error compiling assets/less/index.less\r\n(node:6672) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'css' of undefined\r\n(node:6672) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.\r\n```\r\n\r\nThe gruntfile config for less looks unsuspicious:\r\n```\r\n\t\tless: {\r\n\t\t\tdev: {\r\n\t\t\t\tfiles: {\r\n\t\t\t\t\t'assets/css/index_raw.css': 'assets/less/index.less'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n...\r\n\t\twatch: {\r\n\t\t\tcss: {\r\n\t\t\t\tfiles: ['assets/less/**/*.less'],\r\n\t\t\t\ttasks: ['less:dev', 'autoprefixer', 'clean:less', 'newer:copy:server'],\r\n\t\t\t\toptions: {\r\n\t\t\t\t\tspawn: false\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n...\r\n```\r\n\r\nThe project that got me started was [micromata/bootstrap-kickstart](/micromata/bootstrap-kickstart)\r\nI am using Windows 10 Pro (64bit), node v7.2.0, grunt-cli v1.2.0, grunt v1.0.1 and grunt-contrib-less v1.4.0\r\n"},"comment":{"url":"https://api.github.com/repos/gruntjs/grunt-contrib-less/issues/comments/263512037","html_url":"https://github.com/gruntjs/grunt-contrib-less/issues/329#issuecomment-263512037","issue_url":"https://api.github.com/repos/gruntjs/grunt-contrib-less/issues/329","id":263512037,"user":{"login":"krnlde","id":1087002,"avatar_url":"https://avatars.githubusercontent.com/u/1087002?v=3","gravatar_id":"","url":"https://api.github.com/users/krnlde","html_url":"https://github.com/krnlde","followers_url":"https://api.github.com/users/krnlde/followers","following_url":"https://api.github.com/users/krnlde/following{/other_user}","gists_url":"https://api.github.com/users/krnlde/gists{/gist_id}","starred_url":"https://api.github.com/users/krnlde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krnlde/subscriptions","organizations_url":"https://api.github.com/users/krnlde/orgs","repos_url":"https://api.github.com/users/krnlde/repos","events_url":"https://api.github.com/users/krnlde/events{/privacy}","received_events_url":"https://api.github.com/users/krnlde/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T08:53:55Z","updated_at":"2016-11-29T08:53:55Z","body":"Possibly the same underlying problem: https://github.com/gruntjs/grunt-contrib-imagemin/issues/372"}}
{"actor":{"display_login":"krnlde"}}