Tslint: UnhandledPromiseRejectionWarning:

Created on 10 Jan 2018  路  6Comments  路  Source: palantir/tslint

Bug Report

  • __Node.js version__: 9.1.0
  • __TSLint version__: 5.9.0
  • __TypeScript version__: 2.6.2
  • __Running TSLint via__: tslint-webpack-plugin 1.0.0

TypeScript code being linted

this project
https://github.com/javascript-obfuscator/javascript-obfuscator/tree/master/src

with tslint.json configuration:
https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/tslint.json

Actual behavior

error

(node:69959) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'map' of undefined
(node:69959) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

image

Expected behavior

no errors

Description

After updating from 5.8.0 to new 5.9.0 version i got this error. ts-lint is running via [email protected]

External

Most helpful comment

@sanex3339 I've had the same problem, the workaround is:

new TSLintPlugin({
  files: ['./src/**/*.ts'],
  exclude: [] // add this empty array option
})

All 6 comments

Can you run it with the CLI to get a better stack trace?

No error via CLI. Maybe this error related with integration between [email protected] and [email protected]?

In 5.9.1 still this error.

I took a brief look at tslint-webpack-plugin and couldn't see any problems immediately. Note that the package looks somewhat outdated and seems to use what is considered private API (it imports from "tslint/lib/runner"). I could help you further if you had a more verbose stack trace.

@sanex3339 I've had the same problem, the workaround is:

new TSLintPlugin({
  files: ['./src/**/*.ts'],
  exclude: [] // add this empty array option
})

Going to close this issue as it appears to be resolved by @peterreisz 's comment above.

Was this page helpful?
0 / 5 - 0 ratings