2017-06-01 13 views
6

इंस्टॉल करने के बाद चल रहा लिंट विफल रहता है मैंने हाल ही में एंगुलर-सीएलआई का उपयोग करके एक नया एंगुलर 4 प्रोजेक्ट बनाया है।एंजुलर 2-नोटिफिकेशन

समस्या मैं कर रहा हूँ

angular2-notifications स्थापित करने के बाद, मैं एक त्रुटि जब ng lint आदेश चलाने के लिए है।

त्रुटि:

सी लोड करने में विफल: \ Users \ गेब्रियल \ Documents \ GitHub \ GoNoGo \ GoNoGo \ node_modules \ angular2-सूचनाएं \ tslint.json: नहीं मिल सका कस्टम नियम निर्देशिका : C: \ Users \ गेब्रियल \ Documents \ 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 

मैं इस मुद्दे के लिए Google पर किसी भी भाग्य के बिना बदल गया हूं। मैं GitHub repo पर गया हूं और वहां कोई भाग्य नहीं था।

फिर मैं कोणीय 2-अधिसूचना पैकेज की वास्तविक tslint.json फ़ाइल में गया।

मैं शीर्ष पर इस देखें:

"rulesDirectory": [ 
    "node_modules/codelyzer" 
], 

, ng lint आदेश काम करता है जब मैं उन 3 लाइनों को हटा दें।

मेरा सवाल है, क्या मुझे यहां कुछ याद आ रही है? मुझे काम करने के लिए इस कमांड की ज़रूरत है और मुझे नहीं लगता कि पैकेज को संशोधित करना एक स्वीकार्य समाधान है। क्या यह पैकेज में एक बग है जिसे मुझे रिपोर्ट करनी चाहिए?

"lint": [ 
    { 
     "project": "src/tsconfig.app.json", 
     "exclude": "**/node_modules/**/*" 
    }, 
    { 
     "project": "src/tsconfig.spec.json", 
     "exclude": "**/node_modules/**/*" 
    }, 
    { 
     "project": "e2e/tsconfig.e2e.json", 
     "exclude": "**/node_modules/**/*" 
    }] 

angular2-सूचनाएं परियोजना स्पष्ट रूप से उन के लिए एनजी फाहा नहीं तोड़ चाहिए:

आप

उत्तर

6

कोणीय cli.json में अपने फाहा config से node_modules को शामिल न करें धन्यवाद। फिर भी, मुझे लगता है कि यह कहना कुछ हद तक उचित है कि एक परियोजना को कोड को लिंट करने की कोशिश नहीं करनी चाहिए जिसे संपादित नहीं किया जाना चाहिए।

संबंधित मुद्दे