Missing package.json file and node module

In expansions part one lab(parameter), in the question to run nodejs application, I got error missing package.json file and I need to install express module and init the package.json file so that the test passed.
I solved the issue by running:
$ npm install express
$ npm init -y
$ npm install
$ node app.js &

HI @alinthit.kyawkyawmm

I am not quite sure what you’re trying to achieve.

Could you please share the link to the KodeKloud lab where you’re experiencing the issue? That would be very helpful.

Regards.


Lab has issue at question no.7 and the link is >> “Advanced Bash Scripting Course | KodeKloud

Hi @alinthit.kyawkyawmm

Ahh… Now I get it.
It seems the script we are working on is downloading only the app.js. And, when we are trying to run npm install, which looks for package.json is not available on the ./nodejs/kodekloud-lab6. Hence, the error.

Thanks for highlighting this. I’ll notify the lab team to remediate this.

Regards

1 Like

Hi @alinthit.kyawkyawmm

The issue is resolved.

Thanks for you patience and support.

Regards.

1 Like