wbuchwalter / tslint-loader

tslint loader for webpack
192 stars 65 forks source link

Error after update #20

Closed danielmariz closed 8 years ago

danielmariz commented 8 years ago

I was using the version 1.0.2 and after updating for 2.1.3 start having this error on gulp serve

stream.js:94 throw er; // Unhandled stream error in pipe. ^ Error: Cannot find module 'tslint'

I've tried installing tslint which I didn't need before and got this error stream.js:94 throw er; // Unhandled stream error in pipe. ^ Error: ./src/app/app.ts Module build failed: Error: Could not find the following rules specified in the configuration: no-trailing-comma at Object.loadRules (/Users/danielmariz/www/distrix-admin/node_modules/tslint/lib/ruleLoader.js:29:15) at Linter.lint (/Users/danielmariz/www/distrix-admin/node_modules/tslint/lib/tslint.js:24:44) at Object.lint (/Users/danielmariz/www/distrix-admin/node_modules/tslint-loader/index.js:63:23) at Object.module.exports (/Users/danielmariz/www/distrix-admin/node_modules/tslint-loader/index.js:151:8)

back to old version everything is fine.

danielmariz commented 8 years ago

I've found the problem. When I updated the project it took the last config version of tslint and that no-trailing-comma doesn't exist anymore, so I just copy the last tslint configuration and replace my config file it works. Also my web pack options loader was tslint-loader and now it's to be just tslint.

preLoaders: [{ test: /.ts$/, exclude: /node_modules/, loader: 'tslint'}]

latest tslint configurations https://github.com/palantir/tslint/blob/master/tslint.json