Skip to content

Build fails without manual TypeScript compilation #307

@arberiii

Description

@arberiii
  • I'm submitting a ...

    • bug report
    • feature request
    • support request
  • What is the current behavior?
    When trying to run the project (either through npm run build or npm run tutorial) without first compiling TypeScript files, the following error occurs:

Cannot find module '../build/linkedlist.js' from '/Users/arberavdullahu/jiff/lib/jiff-client.js'
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    First delete the build directory rm -rf build and then run npm run build

  • What is the expected behavior?
    The build and tutorial commands should work without requiring manual TypeScript compilation. The TypeScript compilation step should be handled automatically as part of the build process.

  • What is the motivation / use case for changing the behavior?
    This issue was introduced in PR Linkedlist/class #279. The current behavior requires users to manually run tsc -p lib/common/tsconfig.json before running any commands, which is not intuitive and can lead to confusion. This creates a poor developer experience and may prevent new users from getting started with the project.

  • Please tell us about your environment:

    • JIFF Version: 1.0.0/latest
    • Node Version: v23.7.0
    • Browser: all
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)

Suggested fix:

  1. Add TypeScript compilation as a prerequisite step in the build and tutorial scripts
  2. Update documentation to clarify the build process
  3. Consider adding a pre-build hook to ensure TypeScript is always compiled before running other commands

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions