storybookjs / addon-kit

Everything you need to build a Storybook addon

Home Page:https://storybook.js.org/docs/react/addons/writing-addons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] eject-ts script not working

morewings opened this issue · comments

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

  • OS: macOS 12.6.4
  • Node.js version: v18.12.1
  • NPM version: yarn@1.22.19
  • Browser (if applicable): n/a
  • Browser version (if applicable): n/a
  • Device (if applicable): macbook

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