Skip to content

[typescript] [13.basic-bot] Bad configuration on tsconfig.json #166

@Batta32

Description

@Batta32

Sample Information

  1. Sample type: samples
  2. Sample language: typescript
  3. Sample name: basic-bot

Describe the Bug

Building the sample gives a bad configuration (structure) of the files in lib directory.

To Reproduce

Steps to reproduce the behavior:

  1. Follow the README instructions.
  2. Execute npm build command.
  3. Look the lib directory created.
  4. Execute npm start.
  5. See error.

Expected Behavior

Build the solution and start the bot.

Screenshots

image

image

Additional Context

The issue is that the tsconfig.json is setted to transpile the "src" and the "resources" folders, but the resources folder has nothing to transpile. The result of this configuration is the creation of the "src" subfolder inside the "lib" folder. This breaks the node run command and some of the objects references inside the project that points to the "lib" root folder instead of the "src" subfolder.

Proposed Solution

Replace in tsconfig.json:
"rootDirs": ["./src", "./resources"] ----> rootDir": "./src",

The solution would be just to compile only the "src" folder.

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