typewriter
typewriter copied to clipboard
Does not work with React 17.
- Create an application with create-react-app.
- Add typewriter
yarn add -D typewriter
- Run typewriter init
npx typewriter init
You will get this error:
TypeError: setRawMode is not a function
at SelectInput.componentDidMount (/Users/djohnston/git/typewriter/node_modules/ink-select-input/build/SelectInput.js:161:5)
at jg (/Users/djohnston/git/typewriter/node_modules/typewriter/node_modules/react-reconciler/cjs/react-reconciler.production.min.js:152:160)
at exports.unstable_runWithPriority (/Users/djohnston/git/typewriter/node_mo
✖ Error: An unexpected error occurred.
→ setRawMode is not a function
If you are unable to resolve this issue, open an issue on GitHub. Please inclu
de
that you are using version 7.4.1 of Typewriter.
Downgrading to React 16 solves this issue.
https://github.com/segmentio/typewriter/issues/139