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/jiti@2.6.1/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/jiti@2.6.1/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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions