Skip to content

Codemod crashes looking for tsconfig.jsonΒ #164

Description

@jagthedrummer

I'm not using Typescript in my app and that seems to cause this codemod to fail.

npx ember-vite-codemod@latest --skip-v2-addon

🐹 Moving seshy to Vite

βœ” Checking Git status
βœ” Checking modulePrefix
βœ” Checking for unsupported dependencies

Skipping file '.env.development' since it already exists.
βœ” Creating new required files...
βœ” Moving index.html
βœ– ENOENT: no such file or directory, open 'tsconfig.json'
node:internal/fs/promises:640
  return new FileHandle(await PromisePrototypeThen(
                        ^

Error: ENOENT: no such file or directory, open 'tsconfig.json'
    at async open (node:internal/fs/promises:640:25)
    at async readFile (node:internal/fs/promises:1290:14)
    at async transformWithReplace (file:///Users/jgreen/.npm/_npx/c290a1b5fd4ffffc/node_modules/ember-vite-codemod/lib/tasks/transform-files.js:86:14)
    at async modifyFiles (file:///Users/jgreen/.npm/_npx/c290a1b5fd4ffffc/node_modules/ember-vite-codemod/lib/tasks/transform-files.js:52:7)
    at async run (file:///Users/jgreen/.npm/_npx/c290a1b5fd4ffffc/node_modules/ember-vite-codemod/lib/utils/run.js:17:5)
    at async file:///Users/jgreen/.npm/_npx/c290a1b5fd4ffffc/node_modules/ember-vite-codemod/index.js:110:3 {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'tsconfig.json'
}

Node.js v24.18.0

The docs that that it should default to NOT looking for Typescript files unless I specify the --ts flag, but that doesn't seem to be the case.

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