Rocket.Chat.Apps-cli icon indicating copy to clipboard operation
Rocket.Chat.Apps-cli copied to clipboard

Compilation ignores tsconfig.json

Open ben-ganley opened this issue 9 months ago • 1 comments

I'm currently trying to build an app via the rc-apps package command.

I've tried on my windows machine and receive the following error

packaging your app... ! Error: Invalid App package. Could not find the classFile (src/CloudflareZeroTrustApp.ts) file.

I've also attempted to run the same command under WSL and it seems to get further but also fails with

rc-apps package 2025-05-02 11:02:23.288 WARN App has external module(s) as dependency (node:7522) [DEP0044] DeprecationWarning: The util.isArray API is deprecated. Please use Array.isArray() instead. (Use node --trace-deprecation ... to show where the warning was created) (node:7522) [DEP0047] DeprecationWarning: The util.isDate API is deprecated. Please use arg instanceof Date instead. packaging your app... ⣻

error: The working directory "/home/ben/cloudflare-zero-trust-app" is not an absolute path packaging your app... ! Error: Build failed with 1 error: error: The working directory "/home/ben/cloudflare-zero-trust-app" is not an absolute path

ben-ganley avatar May 01 '25 23:05 ben-ganley

In investigating this, it seems that rc-apps package will ignore the tsconfig.json file configured at the root of the project.

This means that if you make modifications to this, like to change the include path or adjust other complier options, these changes will not be picked up.

For example I'm trying to include chrono-node in my app and this requires esModuleInterop to be enabled since the output is commonjs.

ben-ganley avatar May 02 '25 05:05 ben-ganley