scienceai / neocortex

Run trained deep neural networks in the browser or node.js
https://scienceai.github.io/neocortex
Apache License 2.0
275 stars 26 forks source link

Error Starting examples server #6

Closed dandxy89 closed 8 years ago

dandxy89 commented 8 years ago

Trying to run the examples however I receive this error, are you able to advise how I resolve this?

/home/dan1/Desktop/neocortex/examples/server.js:3
let express = require('express');
^^^
SyntaxError: Unexpected strict mode reserved word
    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! neocortex-js@0.1.5 examples-server: `npm run build-browser && cp build/neocortex.min.js examples && node examples/server.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the neocortex-js@0.1.5 examples-server script.
npm ERR! This is most likely a problem with the neocortex-js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build-browser && cp build/neocortex.min.js examples && node examples/server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls neocortex-js
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.19.0-31-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "examples-server"
npm ERR! cwd /home/dan1/Desktop/neocortex
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/dan1/Desktop/neocortex/npm-debug.log
npm ERR! not ok code 0

dan1@dan1-OptiPlex-990:~/Desktop/neocortex$ npm owner ls neocortex-js
scienceai <team@standardanalytics.io>```
dandxy89 commented 8 years ago
0 info it worked if it ends with ok
1 verbose cli [ '/home/dan1/.nvm/versions/v0.12.7/bin/node',
1 verbose cli   '/home/dan1/.nvm/versions/v0.12.7/bin/npm',
1 verbose cli   'run',
1 verbose cli   'examples-server' ]
2 info using npm@2.11.3
3 info using node@v0.12.7
4 verbose run-script [ 'preexamples-server',
4 verbose run-script   'examples-server',
4 verbose run-script   'postexamples-server' ]
5 info preexamples-server neocortex-js@0.1.5
6 info examples-server neocortex-js@0.1.5
7 verbose unsafe-perm in lifecycle true
8 info neocortex-js@0.1.5 Failed to exec examples-server script
9 verbose stack Error: neocortex-js@0.1.5 examples-server: `npm run build-browser && $
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/home/dan1/.nvm/versions/v0.12.7/lib$
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/home/dan1/.nvm/versions/v0.12.7/lib$
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1015:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid neocortex-js@0.1.5
11 verbose cwd /home/dan1/Desktop/neocortex
12 error Linux 3.19.0-31-generic
13 error argv "/home/dan1/.nvm/versions/v0.12.7/bin/node" "/home/dan1/.nvm/versions/v$
14 error node v0.12.7
15 error npm  v2.11.3
16 error code ELIFECYCLE
17 error neocortex-js@0.1.5 examples-server: `npm run build-browser && cp build/neoco$
17 error Exit status 1
18 error Failed at the neocortex-js@0.1.5 examples-server script 'npm run build-brows$
18 error This is most likely a problem with the neocortex-js package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     npm run build-browser && cp build/neocortex.min.js examples && node exam$
18 error You can get their info via:
18 error     npm owner ls neocortex-js
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]
transcranial commented 8 years ago

@dandxy89 Hey, the problem was your older version of node - but there's no reason it shouldn't work on it, so it's been fixed. Should be working now. Thanks for bringing it to my attention!

dandxy89 commented 8 years ago

Thanks - All the best