ember-apply icon indicating copy to clipboard operation
ember-apply copied to clipboard

`npx ember-apply typescript` doesn't work in v1 addons

Open Windvis opened this issue 2 years ago • 1 comments

The documentation mentions that this automation should also work for v1 addons, but when I try it on this one I see the following console output:

Debugger attached.
ℹ Downloading from npm...
ℹ Applying: typescript
ℹ If there are any bugs with this applyable, feel free to report at https://github.com/NullVoxPopuli/ember-apply/issues
Could not determine where to enable TypeScripts in ember-cli-build.js. Please refer to the docs: https://github.com/emberjs/ember-cli-babel#enabling-typescript-transpilation
✖ ENOENT: no such file or directory, open 'types/global.d.ts'
[Error: ENOENT: no such file or directory, open 'types/global.d.ts'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'types/global.d.ts'
}

My guess is that this check fails because the ember-cli-build.js file for addons seems to contain const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); instead of what that check looks for.

Windvis avatar Jan 12 '24 16:01 Windvis

thanks for reporting!!!

NullVoxPopuli avatar Jan 12 '24 16:01 NullVoxPopuli