Horizon-Chat-MobX-OnsenUI icon indicating copy to clipboard operation
Horizon-Chat-MobX-OnsenUI copied to clipboard

the top page is blank.

Open wenbo opened this issue 7 years ago • 6 comments

now I wanna make a chat application using OnsenUI, So I found this cool repository with luck. But unluckily the top page is blank as the following screenshot shows.

2018-05-21 16 57 53

The steps that I run the project are as blow.

  1. hz serve --dev --bind all -p 5000
  2. npm install
  3. npm run start
  4. Visit http://localhost:3000/

Could you have a look at it please? @philolo1

wenbo avatar May 21 '18 08:05 wenbo

@wenbo i will look into it.

philolo1 avatar May 21 '18 08:05 philolo1

@philolo1 Thanks for your reply. Is it possible that the problem is with Horizon, I have adjusted the IP address to localhost like below.

diff --git a/src/app/index.jsx b/src/app/index.jsx
index 49c134e..43cceb1 100644
--- a/src/app/index.jsx
+++ b/src/app/index.jsx
@@ -4,7 +4,7 @@ import AppState from './AppState';
 import App from './App';
 import Horizon from '@horizon/client';

-const horizon = Horizon({host: '192.81.214.88:5000'});
+const horizon = Horizon({host: 'localhost:5000'});
 const appState = new AppState(horizon);

wenbo avatar May 21 '18 08:05 wenbo

@wenbo if you look in my code, is should print out horizon is ready before rending, so the error definetly lies in their.

philolo1 avatar May 21 '18 08:05 philolo1

@wenbo i just updated the horizon package and now its starting. but probably there are other errors. This project is like two years old, so please feel free to also do a pull request if you find any issues. Please pull the newest master, it should have an updated package.json and then delete the node_modules folder and try again.

philolo1 avatar May 21 '18 08:05 philolo1

@philolo1 with the newset master, I got the following errors when run 'npm start'

ERROR in ./~/engine.io-client/~/engine.io-parser/lib/browser.js
Module not found: Error: Cannot resolve module 'arraybuffer.slice' in /Users/wenbo/workspace/ruby-dev/mobile/Horizon-Chat-MobX-OnsenUI/node_modules/engine.io-client/node_modules/engine.io-parser/lib
 @ ./~/engine.io-client/~/engine.io-parser/lib/browser.js 7:18-46

ERROR in ./~/engine.io-client/~/engine.io-parser/lib/browser.js
Module not found: Error: Cannot resolve module 'blob' in /Users/wenbo/workspace/ruby-dev/mobile/Horizon-Chat-MobX-OnsenUI/node_modules/engine.io-client/node_modules/engine.io-parser/lib
 @ ./~/engine.io-client/~/engine.io-parser/lib/browser.js 71:11-26
webpack: Failed to compile.

And I have no idea with the errors.

wenbo avatar May 21 '18 09:05 wenbo

@philolo1 have you remembered the steps to set up horizon in 192.81.214.88:5000, Maybe the command of hz serve --dev --bind all -p 5000 is not enough to set horizon up correctly.

wenbo avatar May 21 '18 09:05 wenbo