Reputation: 3860
I need to run up a sandbox React app with version 16 and typescript.
Does anyone know how to do that as npx create-react-app --template=typescript blah
now uses React 17?
Update
As suggested in the comments I've attempted to install with this:
npm init react-app migration-calculator-npm-demo --scripts-version 3.4.4
and
npm init react-app migration-calculator-npm-demo --template typescript --scripts-version 3.4.4
3.4.4
looks like the last version of react-scripts
since before the major update.
Unfortunately, I'm getting errors with both.
internal/modules/cjs/loader.js:1088
throw err; ^Error: Cannot find module 'cra-template'
and
internal/modules/cjs/loader.js:1088
throw err; ^Error: Cannot find module 'cra-template-typescript'
Upvotes: 7
Views: 22450
Reputation: 51
I think this will help you to create react app with typescript.
npx create-react-app my-app --scripts-version 16.XX.XX --template typescript
Upvotes: -2