ryanmurakami / pizza-luvrs

❤️🍕🍕❤️ Demo project for AWS Developer: Getting Started on Pluralsight
114 stars 255 forks source link

Getting error while "npm start". giving error at function #37

Closed vishalsahare closed 4 years ago

vishalsahare commented 4 years ago

[ec2-user@ip-10-0-0-225 pizza-luvrs]$ npm start

pizza-luvrs@1.0.0 start /home/ec2-user/pizza-luvrs node index.js

/home/ec2-user/pizza-luvrs/index.js:6 async function startServer () { ^^^^^^^^

SyntaxError: Unexpected token function at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3) at Module.runMain (module.js:611:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:160:9)

npm ERR! Linux 4.14.146-93.123.amzn1.x86_64 npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" npm ERR! node v6.17.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! pizza-luvrs@1.0.0 start: node index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pizza-luvrs@1.0.0 start script 'node index.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the pizza-luvrs package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node index.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs pizza-luvrs npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls pizza-luvrs npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/ec2-user/pizza-luvrs/npm-debug.log

ryanmurakami commented 4 years ago

Hi @vishalsahare, This appears to be an issue with the version of node you are running. Can you confirm that when you run node -v it returns a version of at least 12? The program currently required node.js 12 or higher.