larrymyers / react-mini-router

A minimal URL router for React.js
MIT License
282 stars 34 forks source link

Can't run examples #35

Closed pavlelekic closed 9 years ago

pavlelekic commented 9 years ago

I have Ubuntu 14.04 with node version v0.10.37. Here is what I get when I run 'npm install':

pavle@pavle-Lenovo-B50-70:~/Desktop/react-mini-router-1.1.6/example$ npm start

> react-mini-router-example@0.0.1 start /home/pavle/Desktop/react-mini-router-1.1.6/example
> node server.js

module.js:340
    throw err;
          ^
Error: Cannot find module './app/components/app'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pavle/Desktop/react-mini-router-1.1.6/example/server.js:15:31)
    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 Function.Module.runMain (module.js:497:10)

npm ERR! react-mini-router-example@0.0.1 start: `node server.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the react-mini-router-example@0.0.1 start script.
npm ERR! This is most likely a problem with the react-mini-router-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls react-mini-router-example
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-41-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /home/pavle/Desktop/react-mini-router-1.1.6/example
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pavle/Desktop/react-mini-router-1.1.6/example/npm-debug.log
npm ERR! not ok code 0

Here is the npm debug log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@1.4.28
3 info using node@v0.10.37
4 verbose node symlink /usr/bin/node
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart react-mini-router-example@0.0.1
7 info start react-mini-router-example@0.0.1
8 verbose unsafe-perm in lifecycle true
9 info react-mini-router-example@0.0.1 Failed to exec start script
10 error react-mini-router-example@0.0.1 start: `node server.js`
10 error Exit status 8
11 error Failed at the react-mini-router-example@0.0.1 start script.
11 error This is most likely a problem with the react-mini-router-example package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error     node server.js
11 error You can get their info via:
11 error     npm owner ls react-mini-router-example
11 error There is likely additional logging output above.
12 error System Linux 3.16.0-41-generic
13 error command "/usr/bin/node" "/usr/bin/npm" "start"
14 error cwd /home/pavle/Desktop/react-mini-router-1.1.6/example
15 error node -v v0.10.37
16 error npm -v 1.4.28
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]

Please advise. Thanks. Pavle

larrymyers commented 9 years ago

To run the example app:

cd example npm install gulp serve

http://localhost:4000

I've updated the README with these instructions.

yofret commented 8 years ago

Im following the README with the given instruction but I can't run the example

here are the logs

[22:40:52] Using gulpfile ~\Downloads\react-mini-router-master\example\gulpfile.js [22:40:52] Starting 'react'... [22:40:52] Starting 'watch'... [22:40:52] Finished 'watch' after 16 ms [22:40:52] Finished 'react' after 44 ms [22:40:52] Starting 'serve'... [22:40:52] Finished 'serve' after 1.52 ms [gulp] [nodemon] 1.9.1 [gulp] [nodemon] to restart at any time, enter rs [gulp] [nodemon] watching: C:\Users\Yofret\Downloads\react-mini-router-master\example\app/*/ [gulp] [nodemon] starting node server.js module.js:338 throw err; ^ Error: Cannot find module 'react' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (C:\Users\Yofret\Downloads\react-mini-router-master\lib\RouterMixin.js:1:75) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) [gulp] [nodemon] app crashed - waiting for file changes before starting...

Any Ideas what might be wrong?