Minitour / BigDataHW4

MIT License
0 stars 0 forks source link

Can't run the node.js server #10

Closed tomersagi closed 5 years ago

tomersagi commented 5 years ago

This is the error message:

$ node modules/iex/app.js 
/home/tomer/Teaching/BigDataMgt/BigDataHW4Tonyetal/modules/iex/app.js:32
            let objc = JSON.parse(data)
            ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
Minitour commented 5 years ago

I forgot to add the “npm install” command. CD to the iex directory and run “npm install”. Should work after that.

On Wed, Jan 23, 2019 at 4:11 PM Tomer Sagi notifications@github.com wrote:

This is the error message:

$ node modules/iex/app.js /home/tomer/Teaching/BigDataMgt/BigDataHW4Tonyetal/modules/iex/app.js:32 let objc = JSON.parse(data) ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:374:25) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:442:10) at startup (node.js:136:18) at node.js:966:3

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Minitour/BigDataHW4/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AQoXmXbR902y0MYsXU9mbDI6DqH9q4Zpks5vGG2fgaJpZM4aO3SQ .

tomersagi commented 5 years ago

And you forgot to add that you need to install nodejs and npm on the machine.

Minitour commented 5 years ago

Yeah that too... my bad

https://nodejs.org/en/download/

npm comes with nodejs pre-packaged.

Minitour commented 5 years ago

Might as well let you know you should also install the following python libs:

pip install bs4 
pip install flask 
pip install nltk
pip install pyspark
pip install requests 
pip install requests_oauthlib 
pip install sklearn
tomersagi commented 5 years ago

ok, fixed