typia: Question: build javascript, `"build": "ttsc -b"`, Error on TSON.assertEquals(): no transform has been configured. Configure the \"tsconfig.json\" ...

Hi!

I’ve scoured the interwebs seeking an answer to this question to no avail, so thought you may be able to help me.

There is this node16 typescript lambda that compiles to javascript before deployment. Currently the package json has the following command as build:

"scripts": {
    "test": "jest --watch",
    "test:ci": "jest",
    "local": "ts-node -C ttypescript src/main.ts ",
    "lint": "eslint . --ext .ts",
    "build": "ttsc -b"
  },

When testing the compiled code, I receive the following error:

> node dist/main.js
ERROR Error: Error on TSON.assertEquals(): no transform has been configured. Configure the "tsconfig.json" file following the [README.md#setup](https://github.com/samchon/typescript-json#setup)
    at halt (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/node_modules/typescript-json/lib/module.js:352:11)
    at assertEquals (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/node_modules/typescript-json/lib/module.js:118:5)
    at handler (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/dist/interactor/lambda.js:42:44)
    at Object.<anonymous> (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/dist/main.js:14:22)
    at Module._compile (node:internal/modules/cjs/loader:1119:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
    at Module.load (node:internal/modules/cjs/loader:997:32)
    at Module._load (node:internal/modules/cjs/loader:838:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:18:47
{
  "_err": "Error on TSON.assertEquals(): no transform has been configured. Configure the \"tsconfig.json\" file following the [README.md#setup](https://github.com/samchon/typescript-json#setup)",
  "_nytTimestamp": "23-11-2022 13:13:39.766",
  "_id": "KvqHraDRFJ7yzzxk3E_mB",
  "logUrl": "",
  "_stack": "Error: Error on TSON.assertEquals(): no transform has been configured. Configure the \"tsconfig.json\" file following the [README.md#setup](https://github.com/samchon/typescript-json#setup)\n    at halt (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/node_modules/typescript-json/lib/module.js:352:11)\n    at assertEquals (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/node_modules/typescript-json/lib/module.js:118:5)\n    at handler (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/dist/interactor/lambda.js:42:44)\n    at Object.<anonymous> (/Users/lararoth/Documents/GitHub/pubtech-stx/functions/source-processor/dist/main.js:14:22)\n    at Module._compile (node:internal/modules/cjs/loader:1119:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)\n    at Module.load (node:internal/modules/cjs/loader:997:32)\n    at Module._load (node:internal/modules/cjs/loader:838:12)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)\n    at node:internal/main/run_main_module:18:47"
}

This is my .tsconfig.json:

{
  "extends": "@tsconfig/node16/tsconfig.json",
  "compilerOptions": {
    "types": ["node"],
    "outDir": "dist",
    "resolveJsonModule": true,
    "allowJs": true,
    "strict": true,
    "plugins": [
      {
        "transform": "typescript-json/lib/transform" //https://www.npmjs.com/package/typescript-json
      }
    ]
  },
  "include": ["src/**/*"]
}

Unrelated, but may help someone else. Spent a while figuring this one out which is for jest in the jest.config.js:

  globals: {
    "ts-jest": {
      tsconfig: "__tests__/tsconfig.json",
      compiler: "ttypescript",
    },
  },

Thank you so much in advance. Really appreciate it.

Edit: Forgot to mention this runs great when running locally.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

4.9.4 is now out FWIW

Ok you do not support transpile only makes sense