2016-10-30 48 views
0

我使用原子: 下列軟件包已安裝:棉短絨,eslint棉短絨凌:陣營 - 終極版/節點:找不到模塊

下已經安裝在該項目的文件夾:

npm install --save-dev eslint-config-rallycoding 
[email protected] node_modules/eslint-config-rallycoding 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 

文件.eslintrc包含:

{ 
"extends": "rallycoding" 
} 

但我發現了以下錯誤在原子:

Error: Cannot find module 'eslint-config-rallycoding' 
Referenced from: /Users/xtd/projects/react-native/RN-course/albums/.eslintrc 
    at Object.resolve (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/util/module-resolver.js:74:19) 
    at resolve (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config/config-file.js:478:33) 
    at load (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config/config-file.js:495:26) 
    at /Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config/config-file.js:391:36 
    at Array.reduceRight (native) 
    at applyExtends (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config/config-file.js:362:28) 
    at Object.load (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config/config-file.js:529:22) 
    at loadConfig (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config.js:63:33) 
    at new Config (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/config.js:226:38) 
    at CLIEngine.executeOnText (/Users/xtd/.atom/packages/linter-eslint/node_modules/eslint/lib/cli-engine.js:743:28) 

我該如何解決?

回答

0

項目文件夾,打開終端內部和嘗試這個辦法:

npm install --save-dev eslint-config-rallycoding 
+0

我已經沒有運氣做到了。無論如何。我從頭開始構建項目框架,它工作。 – Wasteland

相關問題