Skip to content

TS config fails to load: Missing "../dist/babel.cjs" when using jiti; falls back to defaultsย #3

@kyashrathore

Description

@kyashrathore

Summary
Running npx dspyground dev with a TypeScript config causes the loader to fail with โ€œCannot find module '../dist/babel.cjs'โ€ and silently falls back to defaults. The dev server still starts, but the user config
is ignored.

Steps To Reproduce

  • Create a TS config at apps/formcraft/dspyground.config.ts (any valid config will do).
  • Run: npx dspyground dev
  • Observe the warning and that defaults are used instead of the TS config.

Actual Behavior

  • CLI outputs:
    • โ€œ๐Ÿ” Looking for config at: /Users/actual-file-path-here/dspyground.config.tsโ€
    • โ€œCould not load user config, using defaults: Cannot find module '../dist/babel.cjs'โ€
    • Require stack includes .../node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjs
  • App runs, but config is not applied.

Expected Behavior

  • The TS config loads via the bundler/loader without requiring a missing ../dist/babel.cjs, and its settings take effect.

Environment

  • dspyground: installed via npx dspyground dev on [date]
  • Node:v20.19.0
  • Package manager: pnpm - 9.15.9
  • OS: maxOS
  • Jiti version (from require stack): 2.6.1

Logs

  • Full CLI output excerpt:
    • โ€œ๐ŸŒ Opening browser at http://localhost:3002...โ€
    • โ€œ๐Ÿ” Looking for config at: /Users/actual-file-path-here/dspyground.config.tsโ€
    • โ€œโš ๏ธ Could not load user config, using defaults: Cannot find module '../dist/babel.cjs'โ€
    • โ€œRequire stack:
      • /Users/karthikkalyanaraman/work/dspyground/node_modules/.pnpm/[email protected]/node_modules/jiti/lib/jiti.mjsโ€

Note: The absolute path to another userโ€™s(Karthik's) home directory in the stack trace suggests a packaging/build artifact may be leaking paths or vendored deps.

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