storybookjs / addon-kit

Everything you need to build a Storybook addon
https://storybook.js.org/docs/react/addons/writing-addons
MIT License
147 stars 35 forks source link

[Bug] eject-ts script not working #52

Closed morewings closed 1 year ago

morewings commented 1 year ago

Describe the bug

eject-ts script not working

Steps to reproduce the behavior

  1. Use addon-kit template
  2. yarn install
  3. yarn eject-ts
  4. Error happens.

Expected behavior

Should eject smoothly.

Screenshots and/or logs

➜  demo-case git:(main) yarn eject-ts
yarn run v1.22.19
$ zx scripts/eject-typescript.mjs
$ cp -r ./src ./srcTS
$ rm -rf ./src
$ mkdir ./src
$ babel --no-babelrc --presets @babel/preset-typescript ./srcTS -d ./src --extensions ".js,.jsx,.ts,.tsx" --ignore "./srcTS/typings.d.ts"
/bin/bash: babel: command not found
Error: /bin/bash: babel: command not found
    at file:///Users/dima/Dev/demo-case/scripts/eject-typescript.mjs:9:8
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Environment

winkerVSbecks commented 1 year ago

Yea, sorry I missed this in the switch to tsup. We no longer use babel so the script doesn't work.