Error while running a Node js program

Lisa picture Lisa · Jan 18, 2016 · Viewed 13.5k times · Source

I have written a node js program which contained a method called AWS.config.update(). When I tried to run it on terminal, I got an error:

Error: Cannot find module 'aws-sdk'

Answer

Akeshwar Jha picture Akeshwar Jha · Jan 18, 2016

Go to the folder where your node application is installed:

cd location/to/your/folder

And then run this to install the aws-sdk:

npm install aws-sdk