1

嗨,我无法解决此错误,请帮助我解决此错误,我已尝试 sudo apt-get install nodejs legacy 等,但无法找到解决方案

       TS    build-rt
    /home/gautam/sd.js-master/node_modules/tslint/lib/ruleLoader.js:29
            throw new Error(ERROR_MESSAGE);
        ^

Error: 
            Could not find implementations for the following rules specified in the configuration:
            no-trailing-comma
            Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed.
            If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.

    at Object.loadRules (/home/gautam/sd.js-master/node_modules/tslint/lib/ruleLoader.js:29:15)
    at Linter.lint (/home/gautam/sd.js-master/node_modules/tslint/lib/tslint.js:59:44)
    at processFile (/home/gautam/sd.js-master/node_modules/tslint/lib/tslint-cli.js:138:29)
    at /home/gautam/sd.js-master/node_modules/tslint/lib/tslint-cli.js:177:74
    at Array.forEach (native)
    at Object.<anonymous> (/home/gautam/sd.js-master/node_modules/tslint/lib/tslint-cli.js:177:41)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
make: *** [build-rt] Error 1
4

1 回答 1

2

no-trailing-comma 规则已被删除,它已被替换为 trailing-comma 规则 (#687)

编辑:在您的 /tslint.json 文件中删除“no-trailing-comma”的使用。它可以用新的“trailing-comma”规则替换,您可以在此处找到更多信息:https ://palantir.github.io/tslint/rules/trailing-comma/

新规则添加了多行和单行选项,可以是“总是”或“从不”:

"trailing-comma": [true,
    {
        "multiline": "always",
        "singleline": "never"
    }
], 

如果您只想将其关闭,可以添加以下内容:

"trailing-comma": [false],
于 2016-09-30T16:24:48.600 回答