{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/1009","repository_url":"https://api.github.com/repos/gaearon/react-hot-loader","labels_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/1009/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/1009/comments","events_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/1009/events","html_url":"https://github.com/gaearon/react-hot-loader/issues/1009","id":329782925,"node_id":"MDU6SXNzdWUzMjk3ODI5MjU=","number":1009,"title":"ERROR in ./index.js Module build failed: TypeError: template is not a function","user":{"login":"kkseven07","id":25701048,"node_id":"MDQ6VXNlcjI1NzAxMDQ4","avatar_url":"https://avatars1.githubusercontent.com/u/25701048?v=4","gravatar_id":"","url":"https://api.github.com/users/kkseven07","html_url":"https://github.com/kkseven07","followers_url":"https://api.github.com/users/kkseven07/followers","following_url":"https://api.github.com/users/kkseven07/following{/other_user}","gists_url":"https://api.github.com/users/kkseven07/gists{/gist_id}","starred_url":"https://api.github.com/users/kkseven07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkseven07/subscriptions","organizations_url":"https://api.github.com/users/kkseven07/orgs","repos_url":"https://api.github.com/users/kkseven07/repos","events_url":"https://api.github.com/users/kkseven07/events{/privacy}","received_events_url":"https://api.github.com/users/kkseven07/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-06T09:13:40Z","updated_at":"2018-06-06T16:02:14Z","closed_at":null,"author_association":"NONE","body":"Moved to RHL v4 and got this error. I am  a newbie in react and webpack, so you explain how to fix this? \r\nVersions:\r\n \"babel\": \"^6.5.2\",\r\n    \"babel-cli\": \"^6.9.0\",\r\n    \"babel-core\": \"^5.8.38\",\r\n    \"babel-loader\": \"^6.4.1\",\r\n    \"babel-plugin-transform-runtime\": \"^6.9.0\",\r\n    \"babel-preset-es2015\": \"^6.9.0\",\r\n    \"babel-preset-react\": \"^6.5.0\",\r\n    \"babel-preset-stage-0\": \"^6.5.0\",\r\n    \"webpack\": \"^1.9.11\",\r\n\r\n```\r\nERROR in ./index.js\r\nModule build failed: TypeError: template is not a function\r\n    at plugin (/Users/mymac/Work/gowork/react-project/node_modules/react-hot-loader/dist/babel.development.js:27:27)\r\n    at Function.memoisePluginContainer (/Users/mymac/Work/gowork/react-project/node_modules/babel-core/lib/transformation/file/plugin-manager.js:77:23)\r\n    at PluginManager.add (/Users/mymac/Work/gowork/react-project/node_modules/babel-core/lib/transformation/file/plugin-manager.js:209:30)\r\n    at File.buildTransformers (/Users/mymac/Work/gowork/react-project/node_modules/babel-core/lib/transformation/file/index.js:237:21)\r\n    at new File (/Users/mymac/Work/gowork/react-project/node_modules/babel-core/lib/transformation/file/index.js:139:10)\r\n    at Pipeline.transform (/Users/mymac/Work/gowork/react-project/node_modules/babel-core/lib/transformation/pipeline.js:164:16)\r\n    at transpile (/Users/mymac/Work/gowork/react-project/node_modules/babel-loader/lib/index.js:46:20)\r\n    at Object.module.exports (/Users/mymac/Work/gowork/react-project/node_modules/babel-loader/lib/index.js:163:20)\r\n @ multi main\r\nwebpack: Failed to compile.\r\n```\r\nHere is my webpack code\r\n```\r\nvar path = require('path');\r\nvar webpack = require('webpack');\r\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;\r\n\r\nmodule.exports = {\r\n  devtool: 'cheap-module-eval-source-map',\r\n  entry: [\r\n    'webpack-dev-server/client?http://localhost:5050',\r\n    'webpack/hot/only-dev-server',\r\n    // 'react-hot-loader/patch',\r\n    './index'\r\n  ],\r\n  output: {\r\n    path: path.join(__dirname, 'dist'),\r\n    filename: 'bundle.js',\r\n    publicPath: '/static/'\r\n  },\r\n  resolve: {\r\n    extensions: ['', '.js', '.jsx', '.css'],\r\n    alias: { 'react/lib/ReactMount': 'react-dom/lib/ReactMount' }\r\n  },\r\n  plugins: [\r\n    new webpack.HotModuleReplacementPlugin(),\r\n    new webpack.NoErrorsPlugin(),\r\n    // new BundleAnalyzerPlugin()\r\n  ],\r\n  module: {\r\n    loaders: [{\r\n      test: /\\.js$/,\r\n      loaders: ['babel-loader'],\r\n      // loaders: ['react-hot-loader/webpack', 'babel-loader'],\r\n      exclude: /node_modules/,\r\n      include: __dirname\r\n    },\r\n    {\r\n        test: /\\.css$/,\r\n        loaders: [\r\n          'style', 'css',\r\n        ],\r\n    }]\r\n  }\r\n};\r\n```\r\nError happens when I add `\"plugins\": [\"react-hot-loader/babel\"]` to babelrc"},"comment":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/comments/395122661","html_url":"https://github.com/gaearon/react-hot-loader/issues/1009#issuecomment-395122661","issue_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/1009","id":395122661,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTEyMjY2MQ==","user":{"login":"kkseven07","id":25701048,"node_id":"MDQ6VXNlcjI1NzAxMDQ4","avatar_url":"https://avatars1.githubusercontent.com/u/25701048?v=4","gravatar_id":"","url":"https://api.github.com/users/kkseven07","html_url":"https://github.com/kkseven07","followers_url":"https://api.github.com/users/kkseven07/followers","following_url":"https://api.github.com/users/kkseven07/following{/other_user}","gists_url":"https://api.github.com/users/kkseven07/gists{/gist_id}","starred_url":"https://api.github.com/users/kkseven07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkseven07/subscriptions","organizations_url":"https://api.github.com/users/kkseven07/orgs","repos_url":"https://api.github.com/users/kkseven07/repos","events_url":"https://api.github.com/users/kkseven07/events{/privacy}","received_events_url":"https://api.github.com/users/kkseven07/received_events","type":"User","site_admin":false},"created_at":"2018-06-06T16:02:14Z","updated_at":"2018-06-06T16:02:14Z","author_association":"NONE","body":"It didnt help, babel loader requires installed babel-core. Or is there smth i'm doing wrong?"}}
{"actor":{"display_login":"kkseven07"}}