react-toolbox/react-toolbox-example

Error on clone, install, start

q3452 opened this issue · 4 comments

q3452 commented

After git clone, npm install, npm start...I get this error:

> react-toolbox-example@0.11.4 start /home/..../react-toolbox-example
> node server

..../react-toolbox-example/server.js:22
app.get('*', (req, res) => {
                         ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    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)
    at startup (node.js:119:16)
    at node.js:902:3

npm ERR! Linux 3.13.0-95-generic
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.25
npm ERR! npm  v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! react-toolbox-example@0.11.4 start: `node server`
npm ERR! Exit status 8

Ubuntu 14.04/NPM 3.10.7

q3452 commented

I double checked that path included node_modules/.bin, it did.

I ran into a different error when trying to run npm start:

Mac OSX with nvm

Node: 6.5
NPM: 3.10.3

npm start

> react-toolbox-example@0.11.4 start /Users/USER_NAME/workspace/working/react-toolbox-example
> node server

 --------------------------------------
    Local: http://0.0.0.0:8080
 External: http://192.168.1.55:8080
 --------------------------------------
/Users/USER_NAME/workspace/working/react-toolbox-example/node_modules/graceful-fs/polyfills.js:264
      if (stats.uid < 0) stats.uid += 0x100000000
               ^

TypeError: Cannot read property 'uid' of undefined
    at /Users/USER_NAME/workspace/working/react-toolbox-example/node_modules/graceful-fs/polyfills.js:264:16
    at FSReqWrap.oncomplete (fs.js:123:15)

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin/node" "/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin/npm" "start"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! react-toolbox-example@0.11.4 start: `node server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-toolbox-example@0.11.4 start script 'node server'.                                      

npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin/node',
1 verbose cli   '/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin/npm',
1 verbose cli   'start' ]
2 info using npm@3.10.3
3 info using node@v6.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react-toolbox-example@0.11.4~prestart: react-toolbox-example@0.11.4
6 silly lifecycle react-toolbox-example@0.11.4~prestart: no script for prestart, continuing
7 info lifecycle react-toolbox-example@0.11.4~start: react-toolbox-example@0.11.4
8 verbose lifecycle react-toolbox-example@0.11.4~start: unsafe-perm in lifecycle true
9 verbose lifecycle react-toolbox-example@0.11.4~start: PATH: /Users/USER_NAME/.nvm/versions/node/v6.5.0/lib/node_modules/npm/bin/node-gyp-bin:/Users/USER_NAME/workspace/working/react-toolbox-example/node_modules/.bin:/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin:/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin:/usr/local/heroku/bin:/usr/local/bin:/Users/USER_NAME/.rbenv/shims:/Users/USER_NAME/.rbenv/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
10 verbose lifecycle react-toolbox-example@0.11.4~start: CWD: /Users/USER_NAME/workspace/working/react-toolbox-example
11 silly lifecycle react-toolbox-example@0.11.4~start: Args: [ '-c', 'node server' ]
12 silly lifecycle react-toolbox-example@0.11.4~start: Returned: code: 1  signal: null
13 info lifecycle react-toolbox-example@0.11.4~start: Failed to exec start script
14 verbose stack Error: react-toolbox-example@0.11.4 start: `node server`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/Users/USER_NAME/.nvm/versions/node/v6.5.0/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/Users/USER_NAME/.nvm/versions/node/v6.5.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid react-toolbox-example@0.11.4
16 verbose cwd /Users/USER_NAME/workspace/working/react-toolbox-example
17 error Darwin 15.6.0
18 error argv "/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin/node" "/Users/USER_NAME/.nvm/versions/node/v6.5.0/bin/npm" "start"
19 error node v6.5.0
20 error npm  v3.10.3
21 error code ELIFECYCLE
22 error react-toolbox-example@0.11.4 start: `node server`
22 error Exit status 1
23 error Failed at the react-toolbox-example@0.11.4 start script 'node server'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the react-toolbox-example package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     node server
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs react-toolbox-example
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls react-toolbox-example
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
q3452 commented

I resolved my original error, it was related to the JSX class declaration notation which uses stage-2 presets. That doesn't happen any more, though the docs site still doesn't run (/app.js seems to return the index.html for whatever reason).

Additionally, the docs site is missing an e6 promise. You (probably) need to install e6-promise and require it in the webpack config (require('es6-promise/auto');).

It still doesn't run with that for me though which is why I haven't put in a PR with that.