{"action":"closed","issue":{"url":"https://api.github.com/repos/babel/babel/issues/9252","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/9252/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/9252/comments","events_url":"https://api.github.com/repos/babel/babel/issues/9252/events","html_url":"https://github.com/babel/babel/issues/9252","id":394659946,"node_id":"MDU6SXNzdWUzOTQ2NTk5NDY=","number":9252,"title":"babel-node throws exception TypeError: Cannot read property 'canCompile' of undefined","user":{"login":"philmetzger","id":4325631,"node_id":"MDQ6VXNlcjQzMjU2MzE=","avatar_url":"https://avatars0.githubusercontent.com/u/4325631?v=4","gravatar_id":"","url":"https://api.github.com/users/philmetzger","html_url":"https://github.com/philmetzger","followers_url":"https://api.github.com/users/philmetzger/followers","following_url":"https://api.github.com/users/philmetzger/following{/other_user}","gists_url":"https://api.github.com/users/philmetzger/gists{/gist_id}","starred_url":"https://api.github.com/users/philmetzger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philmetzger/subscriptions","organizations_url":"https://api.github.com/users/philmetzger/orgs","repos_url":"https://api.github.com/users/philmetzger/repos","events_url":"https://api.github.com/users/philmetzger/events{/privacy}","received_events_url":"https://api.github.com/users/philmetzger/received_events","type":"User","site_admin":false},"labels":[{"id":441815993,"node_id":"MDU6TGFiZWw0NDE4MTU5OTM=","url":"https://api.github.com/repos/babel/babel/labels/i:%20question","name":"i: question","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-12-28T15:25:01Z","updated_at":"2018-12-29T07:10:28Z","closed_at":"2018-12-29T07:10:28Z","author_association":"NONE","body":"When I perform the following, there is an exception thrown as can be seen below:\r\n\r\n```\r\n$ npm run dev\r\n\r\n> maketube@1.0.0 dev C:\\Projects\\maketube\\frontend\r\n> babel-node server.js --presets env,stage-2\r\n\r\nC:\\Projects\\maketube\\frontend\\node_modules\\babel-register\\lib\\node.js:177\r\nhookExtensions(_babelCore.util.canCompile.EXTENSIONS);\r\n                               ^\r\n\r\nTypeError: Cannot read property 'canCompile' of undefined\r\n    at Object.<anonymous> (C:\\Projects\\maketube\\frontend\\node_modules\\babel-register\\lib\\node.js:177:32)\r\n    at Module._compile (module.js:635:30)\r\n    at Object.Module._extensions..js (module.js:646:10)\r\n    at Module.load (module.js:554:32)\r\n    at tryModuleLoad (module.js:497:12)\r\n    at Function.Module._load (module.js:489:3)\r\n    at Module.require (module.js:579:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.<anonymous> (C:\\Projects\\maketube\\frontend\\node_modules\\babel-cli\\lib\\_babel-node.js:35:22)\r\n    at Module._compile (module.js:635:30)\r\n```\r\n\r\nNot sure why, and I have tried removing node modules, etc. I use node version 8.9.1 but I have also tried with node 11.\r\n\r\nhere is my package.json:\r\n\r\n```\r\n{\r\n  \"name\": \"maketube\",\r\n  \"version\": \"1.0.0\",\r\n  \"scripts\": {\r\n    \"dev\": \"babel-node server.js --presets env,stage-2\",\r\n    \"build\": \"next build\",\r\n    \"start\": \"NODE_ENV=production node server.js\"\r\n  },\r\n  \"author\": \"phil\",\r\n  \"license\": \"MIT\",\r\n  \"dependencies\": {\r\n    \"autoprefixer\": \"7.1.5\",\r\n    \"aws-sdk\": \"^2.213.1\",\r\n    \"axios\": \"0.15.3\",\r\n    \"babel-cli\": \"^6.26.0\",\r\n    \"babel-plugin-inline-react-svg\": \"^0.4.0\",\r\n    \"babel-plugin-module-resolver\": \"^2.7.1\",\r\n    \"babel-plugin-wrap-in-js\": \"^1.1.0\",\r\n    \"body-parser\": \"^1.18.2\",\r\n    \"classnames\": \"^2.2.5\",\r\n    \"cookie-parser\": \"^1.4.3\",\r\n    \"express\": \"^4.16.3\",\r\n    \"faker\": \"^4.1.0\",\r\n    \"glob\": \"^7.1.2\",\r\n    \"http-proxy-middleware\": \"^0.17.4\",\r\n    \"jsonwebtoken\": \"^8.2.0\",\r\n    \"jwt-decode\": \"^2.2.0\",\r\n    \"lodash\": \"^4.17.11\",\r\n    \"moment\": \"^2.21.0\",\r\n    \"net\": \"^1.0.2\",\r\n    \"next\": \"latest\",\r\n    \"njwt\": \"^0.4.0\",\r\n    \"node-sass\": \"^4.4.0\",\r\n    \"normalize.css\": \"^7.0.0\",\r\n    \"postcss-easy-import\": \"^3.0.0\",\r\n    \"postcss-loader\": \"^2.0.7\",\r\n    \"prop-types\": \"^15.6.1\",\r\n    \"raw-loader\": \"^0.5.1\",\r\n    \"react\": \"^16.0.0\",\r\n    \"react-datepicker\": \"^0.64.0\",\r\n    \"react-dom\": \"^16.0.0\",\r\n    \"react-expand-collapse\": \"^0.2.0\",\r\n    \"react-horizontal-timeline\": \"^1.4.0\",\r\n    \"sass-loader\": \"^6.0.6\",\r\n    \"semantic-ui-icon\": \"^2.2.12\",\r\n    \"semantic-ui-react\": \"^0.73.0\",\r\n    \"sqlite\": \"^2.9.0\",\r\n    \"sqlite3\": \"^3.1.13\",\r\n    \"superagent\": \"^3.4.0\",\r\n    \"tls\": \"0.0.1\",\r\n    \"universal-cookie\": \"^2.1.2\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"@babel/core\": \"^7.1.2\",\r\n    \"babel-core\": \"^7.0.0-bridge\",\r\n    \"babel-cli\": \"^6.26.0\",\r\n    \"babel-preset-env\": \"^1.7.0\",\r\n    \"babel-preset-stage-2\": \"^6.24.1\",\r\n    \"now\": \"^8.3.10\"\r\n  }\r\n}\r\n```\r\n\r\nalso provided is my babelrc file:\r\n\r\n```\r\n{\r\n  \"plugins\": [\r\n    [\"inline-react-svg\"],\r\n    [\r\n      \"module-resolver\", {\r\n        \"root\": [\".\"],\r\n        \"alias\": {\r\n          \"styles\": \"./styles\"\r\n        },\r\n        \"cwd\": \"babelrc\"\r\n    }],\r\n    [\r\n      \"wrap-in-js\",\r\n      {\r\n        \"extensions\": [\"css$\", \"scss$\"]\r\n      }\r\n    ]\r\n  ],\r\n  \"presets\": [\r\n    \"next/babel\"\r\n  ],\r\n  \"ignore\": []\r\n}\r\n```\r\n\r\nCan someone help me figure out what to do next to debug this? Or what the issue is?\r\n\r\nThanks"}}
{"actor":{"display_login":"philmetzger"}}