react-router icon indicating copy to clipboard operation
react-router copied to clipboard

Cannot find module 'react/lib/ReactDescriptor'

Open andrewpong opened this issue 12 years ago • 2 comments

After installing the npm module with the command:

npm install --save-dev react-router

And adding the following to my code with Browserify:

var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var Routes = Router.Routes;
var Link = Router.Link;

I get the following message

[10:07:43] gulp-notify: [Gulp] Error: Cannot find module 'react/lib/ReactDescriptor' from '/Users/andrew/Repositories/pcwa-backbone-frontend/node_modules/react-router/modules/utils'

What am I doing wrong? I'm still very new to all of this stuff, so my apologies if this has been answered already. I Googled around for ReactDescriptor and also searched GitHub but came up empty handed. It looks like it exist(ed?) at some point, is it a stale require?

andrewpong avatar Oct 24 '14 17:10 andrewpong

Per this thread here it looks like it was renamed to ReactElement.

andrewpong avatar Oct 24 '14 20:10 andrewpong

Looks like it was my stupidity, I reverted to React 0.11 and it fixed this issue.

andrewpong avatar Oct 25 '14 00:10 andrewpong