'cannot initiate expo bare workflow with typescript

I`m trying to initiate expo bare workflow with typescirpt.

But after I type "expo init [project name]" in command window,

I cannot find minimal(typescirpt) option.

? Choose a template: » - Use arrow-keys. Return to submit.
    ----- Managed workflow -----
    blank               a minimal app as clean as an empty canvas
    blank (TypeScript)  same as blank but with TypeScript configuration
    tabs (TypeScript)   several example screens and tabs using react-navigation and TypeScript
    ----- Bare workflow -----
>   minimal             bare and minimal, just the essentials to get you started

Dose anyone know solution?



Solution 1:[1]

Option 1

  1. Initialize the project with expo init command and choose minimal as a template. Or use this command: expo init --template bare-minimum --name <your-app-name>.
  2. Create a tsconfig.json in your project root: touch tsconfig.json.
  3. Rename App.js to App.tsx: mv App.js App.tsx.
  4. Run expo start. It will prompt you to install the required dependencies (typescript, @types/react, @types/react-native), and automatically configure your tsconfig.json.

For more info see the docs on Expo Typescript support.

Option 2

Use the template with one command expo init --template @vladimir-vovk/expo-bare-typescript.

For more info please read Starting React Native Project in 2022 article.

!! Unfortunately, expo-template-bare-typescript package is outdated. It will install Expo 41.

Solution 2:[2]

Im with this issue to, but you can initiate your project by running

 expo init --template expo-template-bare-typescript --name appname

Solution 3:[3]

+ 4.62.0: there is no longer the option to create a Bare Workflow project with Typescript already configured.

So:

  1. run: expo init nome-do-seu-app
  2. Choose: Bare Workflow -> Minimal
  3. Create a tsconfig.json in your project root
  4. Run expo start. It will prompt you to install the required dependencies (typescript, @types/react, @types/react-native), and automatically configure your tsconfig.json.

enter image description here

  1. Open the tsconfig.json and add "strict": true

enter image description here

  1. Rename App.js to App.tsx: mv App.js App.tsx.

Finish ?

Now your project Bare Workflow is with Typescript configured!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Felipe Kafuri
Solution 3 Erick Amoedo