# Fresh ionic react project got \[ERROR\] Invalid project type: react-vite (project config: .\\ionic.config.json)

**URL:** <https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404>\
**Category:** Ionic Framework\
**Created:** [April 5, 2023, 6:11am UTC](https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404 "2023-04-05T06:11:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![teerasej](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/teerasej/32/71010_2.png) [@teerasej](https://forum.ionicframework.com/u/teerasej)\
**Post date:** [April 5, 2023, 6:11am UTC](https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404/1 "2023-04-05T06:11:44Z")

</div>

1. I create new project with following command:

```auto
ionic start MyApp blank --type=react

```

1. I opened this project on VSCode
2. I use Ionic’s VS Code extension to run a web server like photo below

 ![2023-04-05_13-08-58](https://global.discourse-cdn.com/ionicframework/original/3X/0/8/08ec01e97e4aef019b0899f7d5186d1b5dac103e.png)

1. I got this from output window:

```auto
[Ionic] Running on Web...
> npx ionic serve --external
[ERROR] Invalid project type: react-vite (project config: .\ionic.config.json).
        
        Project type must be one of: angular, react, vue, ionic-angular, ionic1, custom
Bad project type: undefined
[error] node "c:\Users\myuser\.vscode\extensions\ionic.ionic-1.34.1\node_modules\@ionic\cli\bin\ionic" serve --external Failed
[error] Web Failed.

```

This also happened with Project \> Build and everything.

Here is my ionic info:

```auto
Ionic:

   Ionic CLI : 7.0.0 (C:\Users\teerasejjiraphatchan\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework : @ionic/react 7.0.0

Capacitor:

   Capacitor CLI : 4.7.3
   @capacitor/android : not installed
   @capacitor/core : 4.7.3
   @capacitor/ios : not installed

Utility:

   cordova-res : not installed globally
   native-run : 1.7.2

System:

   NodeJS : v18.15.0 (C:\Program Files\nodejs\node.exe)
   npm : 9.5.0
   OS : Windows 10

```

---

<div class="post-metadata">

**Author:** ![jonz94](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jonz94/32/127746_2.png) [@jonz94](https://forum.ionicframework.com/u/jonz94)\
**Post date:** [April 5, 2023, 1:31pm UTC](https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404/2 "2023-04-05T13:31:26Z")

</div>

Hi @teerasej,

I also get same error and I believe this issue is related to the vscode extension. (I just open an issue on Ionic vscode extension’s GitHub: [bug: [ERROR] Invalid project type: react-vite · Issue #101 · ionic-team/vscode-extension · GitHub](https://github.com/ionic-team/vscode-extension/issues/101))

Currently, I just manually type the `npx ionic serve --external` command in the terminal as a workaround.

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/8/7/875d54626690b544bbd31715c78692e8945625d2.png)

---

<div class="post-metadata">

**Author:** ![teerasej](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/teerasej/32/71010_2.png) [@teerasej](https://forum.ionicframework.com/u/teerasej)\
**Post date:** [April 7, 2023, 4:48am UTC](https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404/3 "2023-04-07T04:48:56Z")

</div>

Thank you, @jonz94. I also confirmed that using the command in the terminal directly doesn’t cause any problem, But the ionic’s vscode extension did.

---

<div class="post-metadata">

**Author:** ![teerasej](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/teerasej/32/71010_2.png) [@teerasej](https://forum.ionicframework.com/u/teerasej)\
**Post date:** [April 11, 2023, 1:26pm UTC](https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404/4 "2023-04-11T13:26:31Z")

</div>

The error has been resolved since Ionic’s VS code extension 1.35.0

---

<div class="post-metadata">

**Author:** ![EmreErdogan](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/emreerdogan/32/75750_2.png) [@EmreErdogan](https://forum.ionicframework.com/u/EmreErdogan)\
**Post date:** [August 16, 2023, 5:56pm UTC](https://forum.ionicframework.com/t/fresh-ionic-react-project-got-error-invalid-project-type-react-vite-project-config-ionic-config-json/232404/5 "2023-08-16T17:56:48Z")

</div>

This error still occurs on Ionic VS Code Extension v1.49.0.

Here’s the error message I get when I try to run the app on Android:

```auto
[ERROR] Invalid project type: react-vite (project config: ./ionic.config.json).
        
        Project type must be one of: angular, ionic-angular, ionic1, custom, react, vue
Bad project type: undefined

```

My project is a `react-vite` project btw.
