question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createProxy is not a function

See original GitHub issue

When 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:closed
  • Created 7 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
gaearoncommented, Apr 28, 2016

What is the output of npm ls react-proxy? My guess is you have an old version (less than 3.x) installed for some reason, maybe due to some of the past dependencies. You can try removing node_modules, making sure you only have react-hot-loader (and not react-transform-hmr), and run npm install again.

3reactions
cameronroecommented, Jun 21, 2016

Had the same issue. @alansouzati => Remove any hmr plugins/dependencies. npm prune your packages.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found