Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to start, syntax #39

Closed
aburger opened this issue Jul 27, 2016 · 4 comments
Closed

unable to start, syntax #39

aburger opened this issue Jul 27, 2016 · 4 comments

Comments

@aburger
Copy link

aburger commented Jul 27, 2016

hi there,

i am new with node.js as with tus, i tried to start an example und run in one problem after the other. first your examples are with const, but the code i got wit npm install uses strict and so const does not work. there are even module in the installbase with const.

then:
npm run example

tus-node-server@0.1.0 example /usr/local/node_modules/tus-node-server
nodemon example/server.js

[nodemon] 1.10.0
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node example/server.js

/usr/local/node_modules/tus-node-server/index.js:9
Server,
^
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 Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/node_modules/tus-node-server/example/server.js:1:73)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
[nodemon] app crashed - waiting for file changes before starting...

where inds.js contains:
module.exports = {
Server,
DataStore,
FileStore,
GCSDataStore,
};

....

@Acconut
Copy link
Member

Acconut commented Jul 27, 2016

It seems like you are using an older version of Node.js which does not support the newer ES2016 syntax. We recommend using, at least, Node.js 4.2.X for full support. Please try this approach.

@aburger
Copy link
Author

aburger commented Jul 27, 2016

Am 27.07.2016 um 16:20 schrieb Marius:

It seems like you are using an older version of Node.js which does not support the newer ES2016 syntax. We recommend using, at least, Node.js 4.2.X for full support. Please try this approach.

thanks.
is there a way to use the distros npm but with newer source?

best regards
andreas

@Acconut
Copy link
Member

Acconut commented Jul 27, 2016

It's generally recommended to use a version manager for Node, such as nvm (https://github.com/creationix/nvm) or n (https://github.com/tj/n).

@aburger
Copy link
Author

aburger commented Aug 4, 2016

it works with the new version via git, thanks

@aburger aburger closed this as completed Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants