打字稿编译什么都不做

时间:2021-05-02 20:35:21

标签: typescript

我正在 Typescript 中使用 Express 构建 REST-Api,但我遇到了来自 Typescript-Compiler 的奇怪行为。每当我通过 create or replace function shiwangini_unq() returns bigint as $$ declare v_seq_value bigint; v_shard_id bigint; v_final_value2 bigint ; begin select nextval('shiwangini_seq') into v_seq_value ; v_shard_id := 2; select concat (v_seq_value, v_shard_id ) into v_final_value2 ; return v_final_value2; end ; $$ language plpgsql ; 在我的 Windows-10 机器上本地构建项目时,一切都可以正常编译,但是当我在 Amazon EC2 实例上的完全相同的项目上运行相同的命令时,没有任何反应。我没有看到任何错误,控制台什么也不做,直到我通过 CTRL+C 退出。不,我不仅仅是不耐烦,让它运行几分钟也没有效果。它变得更加奇怪,因为我可以通过运行 tsc -b 来编译项目根目录中的单个文件,但前提是它们被放置在根文件夹中。我的 tsconfig 看起来像这样:

tsc index.ts

我的项目的文件结构是:

{
  "compilerOptions": {
    "lib": [
      "es5",
      "es6"
    ],
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "outDir": "./build",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "sourceMap": true,
    "esModuleInterop": true
  }
}

我的 npm 版本是:7.8.0(在 Amazon EC2 实例上)

我的打字稿版本是:4.2.4(在 Amazon EC2 实例上)

0 个答案:

没有答案
相关问题