facebookarchive / react-page

Easy Application Development with React JavaScript
Apache License 2.0
797 stars 72 forks source link

Won't load. There is no visitors.js file in directory fbtransform #52

Closed dschalk closed 10 years ago

dschalk commented 10 years ago

Won't load. There is no visitors.js file in directory fbtransform. Here is the message I get when I enter "node server" in my Linux terminal or try "build" in Sublime Text: reactVisitors = require('react-tools/vendor/fbtransform/visitors').getVisitor ^ TypeError: Object # has no method 'getVisitorsList' at Object. (/home/a/1_1_react_page/react-page/node_modules/react-page-middleware/src/Packager.js:36:72) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/a/1_1_react_page/react-page/node_modules/react-page-middleware/src/index.js:18:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10)

dhl commented 10 years ago

@dschalk The problem is that the commit facebook/react@8dbc530d1cee38289bea0e3e61f4ff89f7340e47 changed getVisitorsList to getAllVisitors.

You can just open up node_modules/react-page-middleware/src/Packager.js and change getVisitorsList to getAllVisitors and the app should then be running fine.

The pull request facebook/react-page-middleware#17 has the fix for react-page-middleware.

zpao commented 10 years ago

Should be working now with the latest updates (might need to rm -rf node_modules) thanks to @dhl in https://github.com/facebook/react-page-middleware/pull/17