编译打字稿代码时遇到与Bash相关的问题

时间:2019-08-30 22:41:11

标签: typescript

我不知道是否可以在这里问到这个问题,但是在这里:

我刚刚安装了Ubuntu 19.03作为我的第二个可启动操作系统,并且安装了VSC,git,nodejs等。我已经安装了打字稿,并且该打字稿适用于我的其他项目,但是当我尝试编译一个旧版本时项目(也用TS编写),我在控制台中收到一个与bash相关的怪异错误。

> Executing task: tsc -p '/media/kennysinner/When You Fuck Up/Bots/Ja'far Bot/tsconfig.json' <

/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

请注意,我确实使用了运行我的tsconfig.json

的集成编译器任务'tsc:build'

这是我的tsconfig.json编译器选项所组成的:

{
    "compilerOptions": {
        "module": "commonjs",
        "skipLibCheck": true,
        "strictNullChecks": false,
        "target": "es2017",
        "removeComments": true,
        "noImplicitThis": true,
        "inlineSourceMap": true,
        "moduleResolution": "node",
        "outDir": "src/bot/javascript/"
    },
    "include": [
        "src/bot/typescript/", 
    ],
    "exclude": [
        "node_modules"
    ]
}

我已经做了一些Google搜索,但不幸的是找不到我的问题的答案。

1 个答案:

答案 0 :(得分:0)

问题已解决,非常感谢不协调的用户veksen#1060,他在几秒钟内回答了我的问题。 问题是我的名称空间里面有一个',所以编译器搞砸了获取dir /(我想,我不是100%确定这就是为什么它不起作用的原因,我所知道的全部这是因为我项目名称中的'