如何在 Atom 编辑器中修复 "Error running JSHint Package"

How to fix "Error running JSHint Package" in Atom Editor

每次我在 Atom 中编辑 JS 文件时,我都会得到这个错误:

在控制台中看起来像这样:

e[0716/144445.466: ERROR:registration_protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (x2)

[0716/144447.414: ERROR:registration_protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (0x2)

[0716/145116.108: ERROR:registration_protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (x2)

[0716/145122.599: ERROR:registration_protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (@x2)

[Linter] Error running JSHint C:\Users\mjwhi\.atom..ter\dist\index.js:1
Error: [0716/145122.942:ERROR:registration_protocol_win.cc(103)]
CreateFile: The system cannot find the file specified. (x2)
at ChildProcess.<anonymous> (C:\Users\mjwhi\.atom\packages\linter-
jshint\node_modules\sb-exec\lib\index.js:56:20)
at ChildProcess.emit (events.js:223:5)
at maybeClose (internal/child process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child process.js:28
3:5)

[0716/145125.805:ERROR:registration_protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (@x2)

[0716/145126.827: ERROR:registration protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (x2)

[0716/145128.028: ERROR:registration_protocol_win.cc(103)] <embedded>:14
CreateFile: The system cannot find the file specified. (x2)

或者这里的格式更好:

这与我的项目文件夹无关,因此它似乎不是特定于项目的配置问题。卸载并重新安装 JSHint 似乎无济于事,重启 Atom 也无济于事。禁用包会阻止错误弹出,但显然不是真正的解决方案。我该如何解决这个问题?

安装已弃用的 jshint 包 (https://atom.io/packages/jshint),然后安装 linter-jshint,然后卸载已弃用的 jshint 包。之后,重新启动 Atom。 您可以在这里找到更好的解释:https://github.com/AtomLinter/linter-jshint/issues/377