ryanmurakami / pizza-luvrs

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

npm start #60

Closed pavalisoft-creator closed 3 years ago

pavalisoft-creator commented 3 years ago

npm start had give below errors post completion of npm install found 0 vulnerabilities

E:\Personal\AWS\Sample\pizza-luvrs-master>np start 'np' is not recognized as an internal or external command, operable program or batch file.

E:\Personal\AWS\Sample\pizza-luvrs-master>npm start

pizza-luvrs@1.0.0 start node index.js

node:internal/modules/cjs/loader:903 throw err; ^

Error: Cannot find module '@hapi/hapi' Require stack:

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\krish\AppData\Local\npm-cache_logs\2020-10-26T04_23_42_895Z-debug.log

E:\Personal\AWS\Sample\pizza-luvrs-master> 2020-10-26T04_23_42_895Z-debug.log

ryanmurakami commented 3 years ago

Hi @pavalisoft-creator, The errors are saying that the dependencies haven't been installed. Can you try running npm install again from the same location you're at and see if it finishes successfullly?

pavalisoft-creator commented 3 years ago

Yes I tried couple of times but saw same error

pavalisoft-creator commented 3 years ago

2 packages are looking for funding run npm fund for details

found 0 vulnerabilities

pavalisoft-creator commented 3 years ago

E:\Personal\AWS\Sample\pizza-luvrs-master>npm fund pizza-luvrs@1.0.0 -- https://opencollective.com/ioredis |-- ioredis@4.19.1 -- https://github.com/sponsors/sindresorhus -- p-map@4.0.0

ryanmurakami commented 3 years ago

You can ignore that output. So, you run npm install and then npm start and what is the output?

pavalisoft-creator commented 3 years ago

H, Its working now post i cleared the dependencies and did npm install and npm start. THis app is working in my local but when i browsed the same on ec2 and run public IP url then it started to give below error. Is it due to latency issue or is there anyway to correct this error. http://54.156.115.67:3000/ Error: Hmmm… can't reach this page54.156.115.67 took too long to respond Search the web for 54 156 115 67 ERR_CONNECTION_TIMED_OUT

ryanmurakami commented 3 years ago

Try SSHing into the instance and ensure the application is running. Then, you might check the security group running on the instance and make sure that port 3000 is open to your IP.

pavalisoft-creator commented 3 years ago

Hi, I checked it and looks good on ec2 machine like its up and running but when i browse the app and i see below error with pad balancer url. But individual public ip based app is up an d running.

This site can’t be reachedpizza-lb-1943518185.us-east-1.elb.amazonaws.com took too long to respond. Try:

Checking the connection Checking the proxy and the firewall Running Windows Network Diagnostics ERR_CONNECTION_TIMED_OUT

Security group settings as follows:

image

Type Protocol Port range Source Description - optional
SSH TCP 22 0.0.0.0/0 -
Custom TCP TCP 3000 0.0.0.0/0 -
Custom TCP TCP 3000 sg-0206a6279beb5511c (launch-wizard-1) -
rcasca commented 3 years ago

Hi everyone. Just doing the course, and runningnpm installand npm start I get this error:

`λ npm start

pizza-luvrs@1.0.0 start C:\Users...\Documents\AWS Developer Certificate\pizza-luvrs node index.js

C:\Users\Neueda\Documents\AWS Developer Certificate\pizza-luvrs\node_modules\@hapi\hapi\lib\core.js:51 actives = new WeakMap(); // Active requests being processed ^

SyntaxError: Unexpected token = at Module._compile (internal/modules/cjs/loader.js:721:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (C:\Users\Neueda\Documents\AWS Developer Certificate\pizza-luvrs\node_modules\@hapi\hapi\lib\server.js:9:14) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 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. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Neueda\AppData\Roaming\npm-cache_logs\2020-11-16T17_43_38_521Z-debug.log`

can you help me?

ryanmurakami commented 3 years ago

@pavalisoft-creator Sorry for the late reply. It looks like the third rule in your security might not be correct. That "Source" security group should be whatever is attached to your load balancer. Check that the security group is correct there. Then, double check the listener settings in the Target Group and make sure it's trying to connect to port 3000. If those are correct, I think it should work.

ryanmurakami commented 3 years ago

Hi @rcasca, I'm suspecting this is a Node.js version issue. Are you using Node.js version 12 for the course?

rcasca commented 3 years ago

Hi @rcasca, I'm suspecting this is a Node.js version issue. Are you using Node.js version 12 for the course?

Thanks Ryan. That was the problem. I had version 10. After update to actual lts version is running well.

Thanks.