Ts-node Error: return new TSError(diagnosticText, diagnosticCodes);

TS node can help us run the TS code without manually converting it into a JS file

But we passed

npm install -g typescript
npm install -g ts-node

After installing the two packages, running the file with the TS node command may report an error and cannot be executed

At this time, we need to install one more dependency package

npm install -D tslib @types/node

Just run it with TS node


Read More: