Skip to content

[Bug]: i18n Ally插件报错 #907

@webzhouyan

Description

@webzhouyan

软件版本

最新git仓库版本

运行环境

MacOS

运行架构

ARM [64] (别名:AArch64 / ARMv8)

重现步骤

vscode 安装i18n Ally 插件,无法使用,查看输出报错为
TSError: ⨯ Unable to compile TypeScript:

error TS5011: The common source directory of 'tsconfig.json' is '../../../.vscode/extensions/lokalise.i18n-ally-2.13.1/assets'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.

Visit https://aka.ms/ts6 for migration information.

期望的结果是什么?

可以正常使用i18n Ally 插件

实际的结果是什么?

无法使用插件

日志记录(可选)

/Users/xxx/.vscode/extensions/lokalise.i18n-ally-2.13.1/node_modules/ts-node/src/index.ts:513

return new TSError(diagnosticText, diagnosticCodes)

^

TSError: ⨯ Unable to compile TypeScript:

error TS5011: The common source directory of 'tsconfig.json' is '../../../.vscode/extensions/lokalise.i18n-ally-2.13.1/assets'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.

Visit https://aka.ms/ts6 for migration information.

补充说明(可选)

在.vscode的setting.json修改以下配置可以修复

 "i18n-ally.parsers.typescript.compilerOptions": {
    "moduleResolution": "node",
    "ignoreDeprecations": "6.0",
    "rootDir": ".",
    "baseUrl": "."
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions