{"action":"closed","issue":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/1680","repository_url":"https://api.github.com/repos/gulpjs/gulp","labels_url":"https://api.github.com/repos/gulpjs/gulp/issues/1680/labels{/name}","comments_url":"https://api.github.com/repos/gulpjs/gulp/issues/1680/comments","events_url":"https://api.github.com/repos/gulpjs/gulp/issues/1680/events","html_url":"https://github.com/gulpjs/gulp/issues/1680","id":158332919,"number":1680,"title":"gulp 3.9.1 throws error when using gulpfile.babel.js","user":{"login":"nerdgore","id":1582533,"avatar_url":"https://avatars.githubusercontent.com/u/1582533?v=3","gravatar_id":"","url":"https://api.github.com/users/nerdgore","html_url":"https://github.com/nerdgore","followers_url":"https://api.github.com/users/nerdgore/followers","following_url":"https://api.github.com/users/nerdgore/following{/other_user}","gists_url":"https://api.github.com/users/nerdgore/gists{/gist_id}","starred_url":"https://api.github.com/users/nerdgore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerdgore/subscriptions","organizations_url":"https://api.github.com/users/nerdgore/orgs","repos_url":"https://api.github.com/users/nerdgore/repos","events_url":"https://api.github.com/users/nerdgore/events{/privacy}","received_events_url":"https://api.github.com/users/nerdgore/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-03T10:01:18Z","updated_at":"2016-06-03T13:44:16Z","closed_at":"2016-06-03T13:44:16Z","body":"Upgrading to gulp@3.9.1 I receive the following error message:\r\n\r\n```\r\n[11:55:09] Requiring external module babel-register\r\n/workspace/my_app/gulpfile.babel.js:1\r\n(function (exports, require, module, __filename, __dirname) { import env from \"node-env-file\";\r\n\r\n                                                              ^^^^^^\r\nSyntaxError: Unexpected token import\r\n    at exports.runInThisContext (vm.js:53:16)\r\n    at Module._compile (module.js:511:25)\r\n    at loader (/workspace/my_app//node_modules/babel-register/lib/node.js:158:5)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/workspace/my_app/node_modules/babel-register/lib/node.js:168:7)\r\n    at Module.load (module.js:456:32)\r\n    at tryModuleLoad (module.js:415:12)\r\n    at Function.Module._load (module.js:407:3)\r\n    at Module.require (module.js:466:17)\r\n    at require (internal/module.js:20:19)\r\n    at Liftoff.handleArguments (/workspace/my_app/node_modules/gulp/bin/gulp.js\r\n```\r\n\r\nRunning 3.9.0 with this setup or using `babel-node gulp` works perfectly fine.\r\n\r\ncontents of gulp file.babel.js\r\n\r\n```javascript\r\nimport env from \"node-env-file\";\r\nimport gutil from \"gulp-util\";\r\nimport loadTasks from \"gulp-load-tasks\";\r\n\r\n// load dev properties into process.env\r\nenv(\"src/main/resources/dev.properties\");\r\n\r\nloadTasks(\"scripts/tasks\");\r\n\r\nif (process.env.npm_config_buildEnv) {\r\n    gutil.log(`Building for ${gutil.colors.magenta(process.env.npm_config_buildEnv)}`);\r\n} else {\r\n    gutil.log(\"No npm buildEnv peroperty provided\");\r\n    gutil.log(gutil.colors.magenta(\"Running in dev mode!\"));\r\n}\r\n```"}}
{"actor":{"display_login":"callumacrae"}}