Dom lib required for TS to compile in Node app
See original GitHub issueDescribe the bug
Dom lib required by typescript in order to successfully compile node app
Your environment
SDK version number
@aws-sdk/lib-dynamodb@3.36.0
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the Node.js
v12.22.4
Steps to reproduce
- Create a fresh TS workspace
- Set minimal tsconfig.json and do not include “dom” in lib array
- Install @aws-sdk/lib-dynamodb@3.36.0
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
into hello world file- run
tsc
to compile project
Observed behavior
The source code fails to compile with error:
Expected behavior
lib installed into node app should not require “dom” types to compile
Additional context
If you add “dom” to lib array in tsconfig.json, source code will compile successfully
Issue Analytics
- State:
- Created 2 years ago
- Reactions:13
- Comments:5 (1 by maintainers)
Top Results From Across the Web
DOM lib still required for TS to compile in Node app #3991
Please create a minimal reproduction repository containing a package.json, tsconfig.json, and sample .ts file to compile. URL has been globally ...
Read more >It's 2020: let's build a node.js app with TypeScript - Tom Spencer
We therefore only need TypeScript at compile-time - node.js will run the compiled JavaScript files. app.ts. We'll now create the entrypoint for ...
Read more >How to Set Up a Node.js Project with TypeScript
In this tutorial, you will learn how to add TypeScript support to Node.js projects. We will address common needs, such as: compiling and ......
Read more >How to compile/build a TypeScript library that uses no NodeJS ...
In this case all you have to do is compile your typescript to something like a /lib and allow them to install and...
Read more >How to Setup a TypeScript + Node.js Project | Khalil Stemmler
In this short guide, I'll walk you through the process of creating a basic TypeScript application and compiling it.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Getting typescript isomorphic code to compile without assertions across environments generally sucks, but in the public interface looks something like:
Really, it’s missing a typescript feature, maybe
declare interface ReadableStream {}
that evaluates tonever
if not otherwise defined?This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.