codelyzer icon indicating copy to clipboard operation
codelyzer copied to clipboard

importDestructuringSpacingRule.js causing "Error: Cannot find module 'tslint/lib/lint'"

Open ammarhaider7 opened this issue 10 years ago • 2 comments

Running npm run lint from the latest angular2-webpack-starter repo causes the following error that seems to be originating from importDestructuringSpacingRule.js which wasn't happening a few days ago.


> [email protected] lint C:\Users\ammar.haider\oakbrook\angular2-webpack-starter
> npm run tslint "src/**/*.ts"


> [email protected] tslint C:\Users\ammar.haider\oakbrook\angular2-webpack-starter
> tslint "src/**/*.ts"

no-unused-variable is deprecated. Use the tsc compiler options --noUnusedParameters and --noUnusedLocals instead.
module.js:471
    throw err;
    ^

Error: Cannot find module 'tslint/lib/lint'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\ammar.haider\oakbrook\angular2-webpack-starter\node_modules\codelyzer\importDestructuringSpacingRule.js:8:12)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

ammarhaider7 avatar Nov 21 '16 13:11 ammarhaider7

They have updated to tslint 4, which support is not released yet by codelyzer. By the end of the week it should be in npm. You can open an issue in angular2-webpack-starter, most likely they have mismatched peerDependencies.

mgechev avatar Nov 21 '16 16:11 mgechev

@mgechev thanks Minko!

ammarhaider7 avatar Nov 22 '16 10:11 ammarhaider7