DavidWells / isomorphic-react-example

Deprecated! ReactJS + NodeJS ( express ) demo tutorial with video. Universal/Isomorphic JS = Shared JavaScript that runs on both the client & server.
http://davidwells.io
MIT License
1.69k stars 271 forks source link

Broken package.json #2

Open G-Lex opened 9 years ago

G-Lex commented 9 years ago

Hi.

The current package.json will fail to produce a working app after running 'npm install', failing with the following error:

var ReactButton =  React.createFactory(require('./ReactButton').ReactButton);

TypeError: Object function ReactJSShim() {
  error();
} has no method 'createFactory'

I was able to get the app to run by removing the duplicate (but different version) references to react in dependencies and devDependencies and reinstalling with npm install --save, which brought them up to v.0.12.2.

I'm still only getting server side rendering though, as the table just sits there, without any sorting/filtering. There is an 'Invariant Violation' error in the console that says it's possibly due to loading react twice. Thanks!

vasco3 commented 9 years ago

node-jsx should be in dependencies instead of devDependencies. It was breaking the build in my heroku instance because of that.