我最近使用Angular-CLI創建了一個新的Angular4項目。安裝angular2-notifications後運行lint失敗
我遇到的問題是安裝angular2-notifications後,運行ng lint
命令時出現錯誤。
錯誤:
無法加載C:\用戶\加布裏埃爾\文檔\ GitHub的\ GoNoGo \ GoNoGo \ node_modules \ angular2的通知\ tslint.json:找不到自定義規則目錄:C:\用戶\加布裏埃爾\文件\ GitHub的\ GoNoGo \ GoNoGo \ node_modules \ angular2-通知\ node_modules \ codelyzer
堆棧跟蹤:
at new FatalError (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\tslint\lib\error.js:40:23)
at Object.findConfiguration (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\tslint\lib\configuration.js:47:15)
at files.forEach (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\@angular\cli\tasks\lint.js:36:50)
at Array.forEach (native)
at lintConfigs.map (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\@angular\cli\tasks\lint.js:30:19)
at Array.map (native)
at Class.run (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\@angular\cli\tasks\lint.js:21:14)
at Class.run (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\@angular\cli\commands\lint.js:45:25)
at Class.Command.validateAndRun (C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\@angular\cli\ember-cli\lib\models\command.js:128:15)
at C:\Users\Gabriel\Documents\GitHub\Go-NoGo\GoNoGo\node_modules\@angular\cli\ember-cli\lib\cli\cli.js:92:22
我已經轉向谷歌這個問題,沒有任何運氣。我去過GitHub repo,也沒有運氣。
然後我去了angular2-notifications包的實際tslint.json
文件。
我看到在頂部:
"rulesDirectory": [
"node_modules/codelyzer"
],
當我刪除這些三線,該ng lint
命令作品。
我的問題是,我在這裏錯過了什麼?我需要這個命令來工作,我不認爲修改這個包是一個可以接受的解決方案。這是我應該向他們報告的包本身的錯誤嗎?
謝謝