GithubHelp home page GithubHelp logo

geekyants / express-typescript Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 307.0 1010 KB

Express + TypeScript + Boilerplate for Web / API App

Home Page: https://geekyants.github.io/express-typescript/

License: MIT License

TypeScript 58.28% CSS 8.77% JavaScript 3.04% Pug 29.45% Dockerfile 0.45%
boilerplate docker docker-compose exception-handling express express-docker express-docker-compose express-typescript express-typescript-boilerplate express-typescript-tutorial expresstypescript logging node-cluster typescript

express-typescript's Introduction

Hey There! ๐Ÿ™Œ 
๐Ÿคพ that โญ๏ธ button if you like this boilerplate. 

express-typescript

A boilerplate for Node.js App.

  • This boilerplate is built using Express.js web framework, and is using Typescript Lang for writing the app's logic.
  • It uses Node's Cluster API, this helps us to take advantage of multi-core systems & to handle the load.
  • For storing custom constant configurations within the process.env - DotEnv package is used.
  • For Database - Repo contains the use of Mongoose (ie. MongoDB object modeling for Node.js).
  • For Cache - Repo contains the use of memory-cache (ie. A simple in-memory cache for node.js).
  • For Routing - Repo contains the use of express-router & have distributed Routes into two files ie. Web Routes & API Routes.
  • For Route Auth Middleware - Web routes are configured with CSRF Token while the API routes are configured with JSON Web Token.
  • For Strategies Auth - Repo contains the use of the Passport.js. Passport.js is compatible with Express.js and is authentication middleware for Node.js.
  • For Logging - Repo uses custom Log class built in middlewares folder, and it creates logs file by date & removes the log files after 'X' days (You can define that 'X' in the .env file).
  • For Handling Exception - Repo contains two classes ie. Handler & NativeEvent.
  • To Log - use Log.info('Your message should go here!'). Other options for logging are Log.warn, Log.error & Log.custom.
  • For views - Repo contains the use of PUG template engine.
  • For background queues - Repo contains the use of Kue. For more details, please review the Queue class.

Contents

Global Requisites

  • node (>= 10.5.0)
  • tsc (>= 3.0.1)
  • typescript (>= 3.0.1)
  • mongoose (>= 3.6.2)
  • redis

App Structure

Note: I am mentioning only files/folders which you need to configure if required

โ”œโ”€โ”€ dist
โ”œโ”€โ”€ public
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ controllers
โ”‚   โ”‚   โ”œโ”€โ”€ Api
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Auth
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.ts
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ RefreshToken.ts
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Register.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Home.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Auth
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Logout.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Register.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Social.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Account.ts
โ”‚   โ”‚   โ””โ”€โ”€ Home.ts
โ”‚   โ”œโ”€โ”€ exception
โ”‚   โ”‚   โ”œโ”€โ”€ Handler.ts
โ”‚   โ”‚   โ””โ”€โ”€ NativeEvent.ts
โ”‚   โ”œโ”€โ”€ interfaces
โ”‚   โ”‚   โ”œโ”€โ”€ models
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ user.ts
โ”‚   โ”‚   โ””โ”€โ”€ vendors
โ”‚   โ”‚        โ”œโ”€โ”€ index.ts
โ”‚   โ”‚        โ”œโ”€โ”€ INext.ts
โ”‚   โ”‚        โ”œโ”€โ”€ IRequest.ts
โ”‚   โ”‚        โ””โ”€โ”€ IResponse.ts
โ”‚   โ”œโ”€โ”€ middlewares
โ”‚   โ”‚   โ”œโ”€โ”€ CORS.ts
โ”‚   โ”‚   โ”œโ”€โ”€ CsrfToken.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Http.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Kernel.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Log.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Statics.ts
โ”‚   โ”‚   โ”œโ”€โ”€ StatusMonitor.ts
โ”‚   โ”‚   โ””โ”€โ”€ View.ts
โ”‚   โ”œโ”€โ”€ models
โ”‚   โ”‚   โ””โ”€โ”€ User.ts
โ”‚   โ”œโ”€โ”€ providers
โ”‚   โ”‚   โ”œโ”€โ”€ App.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Cache.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Database.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Express.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Locals.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Passport.ts
โ”‚   โ”‚   โ”œโ”€โ”€ Queue.ts
โ”‚   โ”‚   โ””โ”€โ”€ Routes.ts
โ”‚   โ”œโ”€โ”€ routes
โ”‚   โ”‚   โ”œโ”€โ”€ Api.ts
โ”‚   โ”‚   โ””โ”€โ”€ Web.ts
โ”‚   โ”œโ”€โ”€ services
โ”‚   โ”‚   โ””โ”€โ”€ strategies
โ”‚   โ”‚        โ”œโ”€โ”€ Google.ts
โ”‚   โ”‚        โ”œโ”€โ”€ Local.ts
โ”‚   โ”‚        โ””โ”€โ”€ Twitter.ts
โ”‚   โ””โ”€โ”€ index.ts
โ”œโ”€โ”€ views
โ”‚   โ”œโ”€โ”€ includes
โ”‚   โ”œโ”€โ”€ modals
โ”‚   โ”œโ”€โ”€ pages
โ”‚   โ”œโ”€โ”€ partials
โ”‚   โ”œโ”€โ”€ static
โ”‚   โ”‚   โ”œโ”€โ”€ css/*.css
โ”‚   โ”‚   โ””โ”€โ”€ js/*.js
โ”‚   โ””โ”€โ”€ layout.pug
โ”œโ”€โ”€ .env
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ nodemon.json
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ tslint.json

Install, Configure & Run

Below mentioned are the steps to install, configure & run in your platform/distributions.

# Clone the repo.
git clone https://github.com/GeekyAnts/express-typescript.git;

# Goto the cloned project folder.
cd nodets;
# Without Docker

# Note: It is assumed here that you have MongoDB running in the background and that you have created the database.

# Install NPM dependencies.
# Note: You can review the list of dependencies from the below link.
# https://github.com/faizahmedfarooqui/nodets/network/dependencies
npm install;

# Edit your DotEnv file using any editor of your choice.
# Please Note: You should add all the configurations details
# or else default values will be used!
vim .env;

# Run the app
npm run dev;
# With Docker

# Note: It is assumed here that you have Docker running in the background.

# Run the app in docker as a foreground process
docker-compose up

# Run the app in docker as a background process
docker-compose up -d

List of Routes

# Web Routes:

+--------+-------------------------+
  Method | URI
+--------+-------------------------+
  GET    | /
  GET    | /signup
  POST   | /signup
  GET    | /login
  POST   | /login
  GET    | /logout
  GET    | /account
  GET    | /auth/google
  GET    | /auth/google/callback
  GET    | /auth/twitter
  GET    | /auth/twitter/callback
  GET    | /status-monitor
+--------+-------------------------+

# API Routes:

+--------+-------------------------+
  Method | URI
+--------+-------------------------+
  POST   | /api
  POST   | /api/auth/login
  POST   | /api/auth/register
  POST   | /api/auth/refresh-token
+--------+-------------------------+

Screens

Home / Landing Page

Home / Landing Page

Note: This page has sub-sections, like about-us, contact-us & portfolio

LogIn Page

LogIn Page

Note: LogIn with Providers

SignUp Page

SignUp Page

Note: SignUp with Providers

Dashboard Page

Dashboard Page

With Dropdown Menu

Dashboard Page with Dropdown Menu

Page Not Found Page

Page Not Found Page

Note: In case the requested URI does not exist, app shows this page

Under Maintenance Page

Under Maintenance Page

Note: In case an error is generated, so instead of plain errors we can show the under maintenance page.

express-typescript's People

Contributors

daskabe avatar faizahmedfarooqui avatar jonasclaes avatar jsingh0026 avatar rajat117 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

express-typescript's Issues

.env file not find queueMonitor and queueMonitorHttpPort

for App.ts is loadQueue function:
1.const isQueueMonitorEnabled: boolean = Locals.config().queueMonitor;
2.const queueMonitorPort: number = Locals.config().queueMonitorHttpPort;

But .env not find queueMonitor and queueMonitorHttpPort

App don't start on linux Manjaro i3-gaps (Arch)

Describe the bug
I cant start the app on Manjaro I3.

I clone the repo, then install node packages with yarn and finally i

sudo yarn dev 
sudo npm run dev

and i get this error:

[15:57:43] Starting compilation in watch mode...

src/providers/Express.ts:63:29 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '(_error: any) => void' is not assignable to parameter of type '() => void'.

63  	this.express.listen(port, (_error: any) => {
    	                          ~~~~~~~~~~~~~~~~~~

  node_modules/@types/express-serve-static-core/index.d.ts:1036:5
    1036     listen(handle: any, listeningListener?: () => void): http.Server;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The last overload is declared here.

[15:57:47] Found 1 error. Watching for file changes.

missing script

(removed the template, as this is a generic error, not a functional one).

Check Dockerfile:

# Run node server
CMD npm run start

check package.json:

 "scripts": {
    "build": "tsc --project './tsconfig.json'",
    "dev": "tsc --project './tsconfig.json' --watch & NODE_ENV=development nodemon dist",
    "test": "tsc --project './tsconfig.json' && ./node_modules/.bin/mocha dist/**/*.spec.js",
    "lint": "./node_modules/.bin/tslint -c tslint.json 'src/**/**.ts'"
  }

notice, there's no declared command with the name of start.

Getting error while running npm run dev command

I am getting an error while running the command npm run dev. also attach a screenshot below for your reference.

image

If I am using the nodemon command to run Project running properly.

Please help what step I need to follow to resolve this error.

Thanks in advance.

UnhandledPromiseRejectionWarning: MongoError: (Unauthorized) not authorized on admin to execute command

Describe the bug
The application throws a rejection which i believe has to do with the sessions package trying to make updates to mongodb on start. Full error log below


[WARN] UnhandledPromiseRejectionWarning: MongoError: (Unauthorized) not authorized on admin to execute command { insert: "system.indexes", documents: [[{ns admin.sessions} {key [{expires 1}]} {name expires_1} {expireAfterSeconds 0} {unique false}]], ordered: true }
    at Function.MongoError.create (/Users/user/Documents/projects/express-typescript/node_modules/mongodb-core/lib/error.js:31:11)
    at /Users/user/Documents/projects/express-typescript/node_modules/mongodb-core/lib/connection/pool.js:497:72
    at authenticateStragglers (/Users/user/Documents/projects/express-typescript/node_modules/mongodb-core/lib/connection/pool.js:443:16)
    at Connection.messageHandler (/Users/user/Documents/projects/express-typescript/node_modules/mongodb-core/lib/connection/pool.js:477:5)
    at TLSSocket.<anonymous> (/Users/user/Documents/projects/express-typescript/node_modules/mongodb-core/lib/connection/connection.js:333:22)
    at TLSSocket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
    at emitUnhandledRejectionWarning (internal/process/promises.js:168:15)
    at processPromiseRejections (internal/process/promises.js:247:11)
    at processTicksAndRejections (internal/process/task_queues.js:96:32)

To Reproduce
Steps to reproduce the behavior:

  1. run yarn dev or npm run dev

Expected behavior
App Should start

Screenshots
N/A

Desktop (please complete the following information):

  • OS: iOS 12.5

Smartphone (please complete the following information):
N/A

Additional context
Cannot use this template with session

Changes are not reflected in the docker container

When I make any changes in the /controller directory, they do not get reflected in the api request itself
example: changed under /controllers/Api/Home.ts

class Home {
  public static index(req, res, next): any {
    return res.json({
      message: "hi", // Locals.config().name,
    });
  }
}

but the API response is still the name of the app not "hi" unless I restart the docker container.

Getting lint error

Describe the bug
Getting the error while npm run dev
`[06:59:17] File change detected. Starting incremental compilation...

src/controllers/Auth/Login.ts:52:30 - error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'.

52 res.redirect(req.session.returnTo || '/account');
~~~~~~~~

src/models/User.ts:72:30 - error TS2339: Property 'fullname' does not exist on type 'Document<any, any, any>'.

72 const fulladdress = ${this.fullname.trim()} ${this.geolocation.trim()};
~~~~~~~~

src/models/User.ts:72:54 - error TS2339: Property 'geolocation' does not exist on type 'Document<any, any, any>'.

72 const fulladdress = ${this.fullname.trim()} ${this.geolocation.trim()};
~~~~~~~~~~~

src/models/User.ts:78:40 - error TS2339: Property 'password' does not exist on type 'Document<any, any, any>'.

78 bcrypt.compare(_requestPassword, this.password, (_err, _isMatch) => {
~~~~~~~~

src/models/User.ts:90:13 - error TS2339: Property 'email' does not exist on type 'Document<any, any, any>'.

90 if (! this.email) {
~~~~~

src/models/User.ts:94:51 - error TS2339: Property 'email' does not exist on type 'Document<any, any, any>'.

94 const md5 = crypto.createHash('md5').update(this.email).digest('hex');
~~~~~

src/providers/Express.ts:63:29 - error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '(_error: any) => void' is not assignable to parameter of type '() => void'.

63 this.express.listen(port, (_error: any) => {
~~~~~~~~~~~~~~~~~~

node_modules/@types/express-serve-static-core/ts4.0/index.d.ts:1115:5
1115 listen(handle: any, listeningListener?: () => void): http.Server;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The last overload is declared here.

src/routes/Web.ts:40:27 - error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'.

40 res.redirect(req.session.returnTo || '/');
~~~~~~~~

[06:59:19] Found 8 errors. Watching for file changes.

src/controllers/Auth/Login.ts:52:30 - error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'.

52 res.redirect(req.session.returnTo || '/account');
~~~~~~~~

src/models/User.ts:72:30 - error TS2339: Property 'fullname' does not exist on type 'Document<any, any, any>'.

72 const fulladdress = ${this.fullname.trim()} ${this.geolocation.trim()};
~~~~~~~~

src/models/User.ts:72:54 - error TS2339: Property 'geolocation' does not exist on type 'Document<any, any, any>'.

72 const fulladdress = ${this.fullname.trim()} ${this.geolocation.trim()};
~~~~~~~~~~~

src/models/User.ts:78:40 - error TS2339: Property 'password' does not exist on type 'Document<any, any, any>'.

78 bcrypt.compare(_requestPassword, this.password, (_err, _isMatch) => {
~~~~~~~~

src/models/User.ts:90:13 - error TS2339: Property 'email' does not exist on type 'Document<any, any, any>'.

90 if (! this.email) {
~~~~~

src/models/User.ts:94:51 - error TS2339: Property 'email' does not exist on type 'Document<any, any, any>'.

94 const md5 = crypto.createHash('md5').update(this.email).digest('hex');
~~~~~

src/providers/Express.ts:63:29 - error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '(_error: any) => void' is not assignable to parameter of type '() => void'.

63 this.express.listen(port, (_error: any) => {
~~~~~~~~~~~~~~~~~~

node_modules/@types/express-serve-static-core/ts4.0/index.d.ts:1115:5
1115 listen(handle: any, listeningListener?: () => void): http.Server;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The last overload is declared here.

src/routes/Web.ts:40:27 - error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'.

40 res.redirect(req.session.returnTo || '/');
~~~~~~~~`

To Reproduce
Steps to reproduce the behavior:

  1. Go to tsconfig
  2. make a changes
    "compilerOptions": { "target": "es6", "module": "commonjs", "outDir": "dist/", "sourceMap": true, "skipLibCheck": true }, "files": [ "./node_modules/@types/mocha/index.d.ts", // "./node_modules/@types/node/index.d.ts", // "./node_modules/@types/mongoose/index.d.ts", // "./node_modules/@types/mongodb/index.d.ts", "./node_modules/@types/express/index.d.ts", "./node_modules/@types/dotenv/index.d.ts", "./node_modules/@types/express-session/index.d.ts" ],
    to avoid #6 issue

Expected behavior
Should start without these error

Dependency Conflict typescript@"5.0.3" & awesome-typescript-loader@"^5.2.0"

Describe the bug
When running npm install locally, I get a dependency conflict when resolving the dependency tree

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR! dev typescript@"5.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@"^2.7 || ^3" from [email protected]
npm ERR! node_modules/awesome-typescript-loader
npm ERR! dev awesome-typescript-loader@"^5.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/lennart/.npm/_logs/2023-06-19T11_22_57_010Z-eresolve-report.txt

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository
  2. Run npm install
  3. See error

Expected behavior
Npm install is able to run without error

Desktop (please complete the following information):

  • OS: [e.g. iOS] macOS
  • Browser [e.g. chrome, safari] N/A
  • Version [e.g. 22] 12.6.6

Error: `useCreateIndex` is an invalid option.

Describe the bug
The app fails to run or start a connection to a mongodb url because of a deprecated option being set.

To Reproduce
Steps to reproduce the behavior:

  1. run yarn dev or npm run dev

Expected behavior
The Application fails to start

Screenshots

Desktop (please complete the following information):

  • OS: iOS 12.5

Smartphone (please complete the following information):
N/A

Additional context
For versions of Mongoose >= 6, setting useCreateIndex is invalid, and this boilerplate uses >=6.4.6

Project doesn't build

Describe the bug
This repo does not build. complains about ./tsconfig.json not found. but its there.

PS C:\Users\a\Desktop\deleteme2\express-typescript> npm run build

> [email protected] build
> tsc --project './tsconfig.json'

error TS5058: The specified path does not exist: ''./tsconfig.json''.

if i do nox tsc in the project i get 311 errors something to do with mongoose mostly.

....
node_modules/mongoose/types/expressions.d.ts:2880:20 - error TS1110: Type expected.

2880   type UTCOffset = `${hh}` | `${hh}${mm}` | `${hh}:${mm}`;
                        ~~~

node_modules/mongoose/types/pipelinestage.d.ts:220:82 - error TS1110: Type expected.

220       $replaceWith: ObjectExpressionOperator | { [field: string]: Expression } | `$${string}`;
                                                                                     ~~~~

node_modules/mongoose/types/pipelinestage.d.ts:297:1 - error TS1128: Declaration or statement expected.

297 }
    ~


Found 311 errors.

To Reproduce
Steps to reproduce the behavior:

  1. clone repo
  2. npm i
  3. npm r build

Expected behavior
it should build and produce dist folder

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Win11
  • npm: '8.1.2',
  • node: '16.13.2',
  • v8: '9.4.146.24-node.14',
  • tsc: version 5.0.2

**/node_modules/@types/mongoose/index.d.ts' not found

Describe the bug
Getting `error TS6053: File '/Users/**/node_modules/@types/mongoose/index.d.ts' not found. while starting npm run dev

[06:19:09] Found 1 error. Watching for file changes.`

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo and do npm i
  2. Do npm run dev

Expected behavior
Should start without error

fresh install starts with errors

Describe the bug
fresh install starts with errors

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/faizahmedfarooqui/nodets.git;
cd nodets;
npm install;
vim .env;
npm run dev;

Desktop (please complete the following information):

  • OS: MacOS X 10.15.1
  • Node: v12.14.0

Additional context

[20:35:47] Starting compilation in watch mode...

node_modules/@types/node/index.d.ts:64:11 - error TS2300: Duplicate identifier 'IteratorResult'.

64 interface IteratorResult<T> { }
             ~~~~~~~~~~~~~~

  node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6
    41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
            ~~~~~~~~~~~~~~
    'IteratorResult' was also declared here.

node_modules/@types/node/index.d.ts:83:15 - error TS2451: Cannot redeclare block-scoped variable 'custom'.

83         const custom: symbol;
                 ~~~~~~

  node_modules/@types/node/ts3.2/util.d.ts:6:15
    6         const custom: unique symbol;
                    ~~~~~~
    'custom' was also declared here.
  node_modules/@types/node/ts3.2/util.d.ts:9:15
    9         const custom: unique symbol;
                    ~~~~~~
    and here.

node_modules/@types/node/index.d.ts:86:15 - error TS2451: Cannot redeclare block-scoped variable 'custom'.

86         const custom: symbol;
                 ~~~~~~

  node_modules/@types/node/ts3.2/util.d.ts:6:15
    6         const custom: unique symbol;
                    ~~~~~~
    'custom' was also declared here.
  node_modules/@types/node/ts3.2/util.d.ts:9:15
    9         const custom: unique symbol;
                    ~~~~~~
    and here.

node_modules/@types/node/ts3.2/util.d.ts:6:15 - error TS2451: Cannot redeclare block-scoped variable 'custom'.

6         const custom: unique symbol;
                ~~~~~~

  node_modules/@types/node/index.d.ts:83:15
    83         const custom: symbol;
                     ~~~~~~
    'custom' was also declared here.
  node_modules/@types/node/index.d.ts:86:15
    86         const custom: symbol;
                     ~~~~~~
    and here.

node_modules/@types/node/ts3.2/util.d.ts:9:15 - error TS2451: Cannot redeclare block-scoped variable 'custom'.

9         const custom: unique symbol;
                ~~~~~~

  node_modules/@types/node/index.d.ts:83:15
    83         const custom: symbol;
                     ~~~~~~
    'custom' was also declared here.
  node_modules/@types/node/index.d.ts:86:15
    86         const custom: symbol;
                     ~~~~~~
    and here.

node_modules/typescript/lib/lib.es2015.iterable.d.ts:41:6 - error TS2300: Duplicate identifier 'IteratorResult'.

41 type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
        ~~~~~~~~~~~~~~

  node_modules/@types/node/index.d.ts:64:11
    64 interface IteratorResult<T> { }
                 ~~~~~~~~~~~~~~
    'IteratorResult' was also declared here.

[20:35:51] Found 6 errors. Watching for file changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.