Menu

Cannot find module 'aws-sdk'

 

Error: Cannot find module 'aws-sdk'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (E:\assignment\DynamoDBtoCSV\dynamoDBtoCSV.js:2:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789: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)

How to fix cannot find module aws-sdk error?

To install the aws-sdk module you need to run the below npm install command.

npm install aws-sdk

OR 

npm install aws-sdk --save


After executing the above command, the Node aws-sdk module will get downloaded and save locally in the machine. Below is the snapshot of successful execution.

E:\assignment\DynamoDBtoCSV>npm install aws-sdk --save
+ aws-sdk@2.771.0
added 14 packages from 66 contributors and audited 15 packages in 62.496s
found 0 vulnerabilities

Can we create an interface without any method?

Yes, we can create an interface without any method. The interface which doesn't have any method or field declaration is called Marker Interface.

Java has few maker interfaces to handling the special scenarios and let the compiler know to treat those classes in a special way. Below are the example of some marker interfaces.


Java Server Pages(JSP) tags

Elements in Java server pages(JSP) are the syntax that is used to write the code in a JSP file. These elements are called tags in JSP and can be used based on requirment. JSP elements have a different component that is allowed by JSP to write or insert the Java code into the JSP file and further call the Java methods and servlets from JSP. Let's understand the purpose of a few JSP tags in this post.

JSP Declaration 

Declaration tag in JSP function as identification containers for the functions, methods and variables in JSP pages. This tag identifies Java declaration rather than generate output.

<%! jsp declaration %>

JSP Expression

Expression tag used for scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. 

 

<%= Java statement %>

JSP Directive

Directives tag also called message tag is instructional tags that are used to provide specific instruction to web containers when the page is loaded and translated. There are three types of directive elements.

<%@ dir-type dir-attr %>

Types of directive elements
1. Page <%@ page %>
2. Include <%@ include %>
3. Taglib <%@ taglib %>

JSP Scriptlet

Scriptlet tag allows you to embed any valid Java source code in JSP server pages.
<% Java code %>

Comment Tag

The comment tag is for information only to write a message for developers and does not appear on JSP pages.
<%/ comments go here />

Flow Control Tag

Flow control tag allows us to control the order in which statements run. The conditional tags if and choose and the iterator tags forEach and forTokens are all examples of JSP flow control tags. The syntax framework for each includes <c:tag_type tag_attribute> Java code . For example, when you use an "if" statement, the correct syntax is <c: if test= "$test parameters"> Java code </c: if > where test= is the type and "$test parameters" identifies tag attributes.
<c:tag_type tag_attribute>


References

1. https://docs.oracle.com/javaee/5/tutorial/doc/bnajq.html#bnajs