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

Can not start server.js, SyntaxError: Unexpected token > #6

Closed
StefanRu1 opened this issue Jan 20, 2017 · 6 comments
Closed

Can not start server.js, SyntaxError: Unexpected token > #6

StefanRu1 opened this issue Jan 20, 2017 · 6 comments

Comments

@StefanRu1
Copy link

node ./server.js

/home/pi/node_modules/node-onvif/sample/manager/server.js:118
onvif.startDiscovery((device) => {
^
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:906:3

node -v
v0.10.29

npm -v
1.4.21

Thank you,
Stefan

@futomi
Copy link
Collaborator

futomi commented Jan 21, 2017

It does not work on node v.0.10.29. Use node v.4.4+.

@futomi futomi closed this as completed Jan 21, 2017
@shmrymbd
Copy link

hi same problem using node -v = v8.8.1

@futomi
Copy link
Collaborator

futomi commented Feb 11, 2018

Thank you for your feedback.
Can you tell me the error in detail? The message "SyntaxError: Unexpected token" should not be output on node v8. What did the error says on your console?

@shmrymbd
Copy link

TypeError: Cannot read property 'prototype' of undefined
at Object. (/Users/shamrymubdi/node-onvif/node_modules/websocket.io/lib/socket.js:49:43)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/Users/shamrymubdi/node-onvif/node_modules/websocket.io/lib/protocols/drafts.js:12:14)
at Module._compile (module.js:643:30)

@shmrymbd
Copy link

manage to run on node@4

@futomi
Copy link
Collaborator

futomi commented Feb 11, 2018

Thank you for the details. The node module websocket.io possibly does not support node v8.
I'll set up an environment of node v8 and try the server.js.

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

3 participants