verma-kunal / AWS-Session

Deploying a Node Js Application on AWS EC2
MIT License
168 stars 1.57k forks source link

issue while deploying/installing #9

Open Hari-GIT1 opened 3 months ago

Hari-GIT1 commented 3 months ago

ubuntu@ip-172-31-12-54:~/AWS-Session$ npm run start

stripe-integration@1.0.0 start /home/ubuntu/AWS-Session node server.js

/home/ubuntu/AWS-Session/server.js:3 const { resolve } = require("path"); ^ 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:901:3 npm ERR! weird error 8 npm ERR! not ok code 0

arashutosh commented 3 weeks ago

there is an error on line numbe 3 in server.js give more brief about the issue

BeinGHuan commented 2 weeks ago

ubuntu@ip-172-31-12-54:~/AWS-Session$ npm run start

stripe-integration@1.0.0 start /home/ubuntu/AWS-Session node server.js

/home/ubuntu/AWS-Session/server.js:3 const { resolve } = require("path"); ^ 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:901:3 npm ERR! weird error 8 npm ERR! not ok code 0

This is probably because of the update of the node package manager as there may be vulnerabilities that the device is not able to rectify.

Try

npm audit npm audit fix npm update npm run start

Even if there's an error try installing the packages manually. Even if that doesn't work either then contact expert professional for the error that you are getting.

BeinGHuan commented 2 weeks ago

there is an error on line numbe 3 in server.js give more brief about the issue

You can try the same method mentioned above as well and check if that works.