createProxy is not a function
See original GitHub issueWhen I try to use react-hot-loader version 3, I’m facing issues with AppContainer.
Uncaught TypeError: createProxy is not a function
I’m using 3.0.0-alpha.12.
NPM: 3.8.3
Node: v5.10.1
This is the code I’m trying to run, I got that from TodoMVC in Redux:
import 'react-hot-loader/patch';
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import Main from './Main';
let element = document.getElementById('content');
render(<AppContainer component={Main} />, element);
document.body.classList.remove('loading');
if (module.hot) {
module.hot.accept('./Main', () => {
render(
<AppContainer
component={require('./Main').default}
/>,
document.getElementById('content')
);
});
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
React App - createProxyMiddleware is not a function
Show activity on this post. const {createProxyMiddleware} = require('http-proxy-middleware'); module. exports = function(app) { app. use( '/api ...
Read more >createProxyMiddleware is not a function, how can I fix this?
here is the code: const { createProxyMiddleware } = require("http-proxy-middleware"); module.exports = function (app) { app.use( ...
Read more >http-proxy-middleware - npm
The one-liner node.js proxy middleware for connect, express and browser-sync. Latest version: 2.0.6, last published: 8 months ago.
Read more >http-proxy.Server.on JavaScript and Node.js code examples
createProxy () this[kServer].on('request', onRequest(proxy.web.bind(proxy))) ... proxy.on('error', function (err, req, res) { logger.error(err) res.
Read more >ProxiesExtensions.CreateProxy Method - Microsoft Learn
CreateProxy (DbContext, Type, Object[]). Creates a proxy instance for an entity type if proxy creation has been turned on. C#
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

What is the output of
npm ls react-proxy? My guess is you have an old version (less than3.x) installed for some reason, maybe due to some of the past dependencies. You can try removingnode_modules, making sure you only havereact-hot-loader(and notreact-transform-hmr), and runnpm installagain.Had the same issue. @alansouzati => Remove any hmr plugins/dependencies.
npm pruneyour packages.