【问题标题】:How do I fix the multiple errors that I'm facing on Atom with the Atom linter?如何使用 Atom linter 修复我在 Atom 上面临的多个错误?
【发布时间】:2022-01-01 10:59:15
【问题描述】:

我在 Atom 上,我的界面当前显示如下:

{运行 gjslint 时出错}(x4) {选择性运行时出错}(x4)

当我打开错误部分时,我发现了以下内容:


[Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running gjslint Error: Failed to spawn command `gjslint`. Make sure `gjslint` is installed and on your PATH
    at VM310 helpers.js:130
(anonymous) @ /Users/Timothy/.atom/packages/linter/dist/index.js:1
linter-registry.ts:133 [Linter] Error running selective Error: ENOENT: no such file or directory, open '/Users/Timothy/Documents/config.selective'
    at Object.openSync (fs.js:440)
    at Object.func [as openSync] (electron/js2c/asar.js:140)
    at readFileSync (fs.js:342)
    at fs.readFileSync (electron/js2c/asar.js:542)
    at module.exports (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/rehype/rehype.js:14)
    at Object.lint (/Users/Timothy/.atom/packages/linter-selective/node_modules/@selective/atom/atom.js:19)
    at linter-registry.ts:107
    at new Promise (<anonymous>)
    at Bt.lint (linter-registry.ts:103)

当我开始处理一个安装了 Atom linter 及其相关细节的新文档时,所有这些都出现了。那么,我该如何纠正这些错误呢?

【问题讨论】:

  • 读取错误,gjslint 未安装,/Users/Timothy/Documents/config.selective 未找到。也许修复或删除您添加的一些 linting 插件/插件
  • 如果我的回答解决了您的问题,您应该点击复选标记图标接受它。这将帮助其他人更轻松地找到可行的解决方案。

标签: javascript html typescript atom-editor


【解决方案1】:

linter-gjslint 包依赖于需要单独安装的gjslint,如文档中所述:

在使用这个插件之前,你必须确保你的系统上已经安装了 gjslint。要安装 gjslint,请阅读 this

这是大多数 linter 包中的常见做法 跨不同的编辑器。

【讨论】:

    猜你喜欢
    • 2023-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-01
    • 2021-12-02
    • 2019-09-17
    • 2017-07-22
    • 1970-01-01
    相关资源
    最近更新 更多