Eslint 所有文件第一行报错 Resolve error: unable to load resolver "node" import/no-duplicates

#1
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\develop\\node.exe',
1 verbose cli   'D:\\develop\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run-script',
1 verbose cli   'lint' ]
2 info using npm@4.1.2
3 info using node@v7.7.1
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle bond-details@1.0.0~prelint: bond-details@1.0.0
6 silly lifecycle bond-details@1.0.0~prelint: no script for prelint, continuing
7 info lifecycle bond-details@1.0.0~lint: bond-details@1.0.0
8 verbose lifecycle bond-details@1.0.0~lint: unsafe-perm in lifecycle true
9 verbose lifecycle bond-details@1.0.0~lint: PATH: D:\develop\node_modules\npm\bin\node-gyp-bin;E:\project\QB\NGPC\BONDdetails\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;E:\java\jdk\jre\bin\;D:\develop\;C:\Users\jun.xie\mysql-5.6.34-winx64\bin;C:\Program Files\nodejs;C:\Users\jun.xie\AppData\Roaming\npm
10 verbose lifecycle bond-details@1.0.0~lint: CWD: E:\project\QB\NGPC\BONDdetails
11 silly lifecycle bond-details@1.0.0~lint: Args: [ '/d /s /c', 'eslint app src' ]
12 silly lifecycle bond-details@1.0.0~lint: Returned: code: 1  signal: null
13 info lifecycle bond-details@1.0.0~lint: Failed to exec lint script
14 verbose stack Error: bond-details@1.0.0 lint: `eslint app src`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (D:\develop\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (D:\develop\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid bond-details@1.0.0
16 verbose cwd E:\project\QB\NGPC\BONDdetails
17 error Windows_NT 6.1.7601
18 error argv "D:\\develop\\node.exe" "D:\\develop\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "lint"
19 error node v7.7.1
20 error npm  v4.1.2
21 error code ELIFECYCLE
22 error bond-details@1.0.0 lint: `eslint app src`
22 error Exit status 1
23 error Failed at the bond-details@1.0.0 lint script 'eslint app src'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the bond-details package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     eslint app src
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs bond-details
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls bond-details
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
#2

求助大神帮忙,谢谢

#3

1:1 error Resolve error: unable to load resolver “node” import/no-duplicates
都是第一行第一列报错,开头都是import引入,去掉import就不会报这个错误

#4

改成
no-duplicate-imports

#5

我现在解决办法也是强行关了,import/no-duplicates:[0]。但是官方文档没这个错,您说得那种是多次引用同一文件,官方文档有的,但是那个貌似是不对的,我没有引用同一文件,这个问题我现在只能暴力解决还不知道什么原因。

#6

谢谢您的帮助