{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/2572","labels_url":"https://api.github.com/repos/babel/babel/issues/2572/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/2572/comments","events_url":"https://api.github.com/repos/babel/babel/issues/2572/events","html_url":"https://github.com/babel/babel/issues/2572","id":112838239,"number":2572,"title":"ReferenceError: Unknown option: stage","user":{"login":"brenolf","id":1520534,"avatar_url":"https://avatars.githubusercontent.com/u/1520534?v=3","gravatar_id":"","url":"https://api.github.com/users/brenolf","html_url":"https://github.com/brenolf","followers_url":"https://api.github.com/users/brenolf/followers","following_url":"https://api.github.com/users/brenolf/following{/other_user}","gists_url":"https://api.github.com/users/brenolf/gists{/gist_id}","starred_url":"https://api.github.com/users/brenolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brenolf/subscriptions","organizations_url":"https://api.github.com/users/brenolf/orgs","repos_url":"https://api.github.com/users/brenolf/repos","events_url":"https://api.github.com/users/brenolf/events{/privacy}","received_events_url":"https://api.github.com/users/brenolf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-22T16:13:29Z","updated_at":"2015-11-02T17:25:18Z","closed_at":"2015-10-30T06:58:39Z","body":"It's similar to #1636, but I couldn't get it working. I have a file:\r\n\r\n```js\r\nrequire('babel/register')\r\nrequire('./config/express')\r\n.listen(process.env.PORT || 3000)\r\n```\r\n\r\nMy `.babelrc` is as follows:\r\n\r\n```json\r\n{\r\n  \"stage\": 0,\r\n  \"loose\": [\"all\"],\r\n  \"optional\": [\"optimisation.flow.forOf\", \"es7.asyncFunctions\"],\r\n  \"env\": {\r\n    \"test\": {\r\n      \"plugins\": [\r\n        \"babel-plugin-rewire\"\r\n      ]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nWhen I run `node app` I get \r\n\r\n```\r\n/Users/breno/node_modules/babel/lib/babel/transformation/file.js:91\r\n        throw new ReferenceError(\"Unknown option: \" + key);\r\n        ^\r\n\r\nReferenceError: Unknown option: stage\r\n    at File.normalizeOptions (/Users/breno/node_modules/babel/lib/babel/transformation/file.js:91:15)\r\n    at new File (/Users/breno/node_modules/babel/lib/babel/transformation/file.js:70:22)\r\n    at transform (/Users/breno/node_modules/babel/lib/babel/transformation/index.js:18:14)\r\n    at Object.transformFileSync (/Users/breno/node_modules/babel/lib/babel/api/node.js:73:10)\r\n    at compile (/Users/breno/node_modules/babel/lib/babel/api/register/node.js:73:20)\r\n    at normalLoader (/Users/breno/node_modules/babel/lib/babel/api/register/node.js:119:14)\r\n    at Object.require.extensions.(anonymous function) [as .js] (/Users/breno/node_modules/babel/lib/babel/api/register/node.js:132:7)\r\n    at Module.load (module.js:356:32)\r\n    at Function.Module._load (module.js:311:12)\r\n    at Module.require (module.js:366:17)\r\n```\r\n\r\nIt works if I run `babel-node app`, though. Using node 4.2.1 and babel-node 5.8.23."},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/153090485","html_url":"https://github.com/babel/babel/issues/2572#issuecomment-153090485","issue_url":"https://api.github.com/repos/babel/babel/issues/2572","id":153090485,"user":{"login":"digitarald","id":8599,"avatar_url":"https://avatars.githubusercontent.com/u/8599?v=3","gravatar_id":"","url":"https://api.github.com/users/digitarald","html_url":"https://github.com/digitarald","followers_url":"https://api.github.com/users/digitarald/followers","following_url":"https://api.github.com/users/digitarald/following{/other_user}","gists_url":"https://api.github.com/users/digitarald/gists{/gist_id}","starred_url":"https://api.github.com/users/digitarald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitarald/subscriptions","organizations_url":"https://api.github.com/users/digitarald/orgs","repos_url":"https://api.github.com/users/digitarald/repos","events_url":"https://api.github.com/users/digitarald/events{/privacy}","received_events_url":"https://api.github.com/users/digitarald/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T17:25:18Z","updated_at":"2015-11-02T17:25:18Z","body":"As this is deprecation and probably affects a few developers it really could benefit from a better error message."}}