ionic-team/vscode-extension

Creating new projects fails

jensbroecher opened this issue · 7 comments

I always get this error message after creating a new project and trying to run "Web":

[ERROR] Invalid project type: vue-vite (project config: ./ionic.config.json).

    Project type must be one of: angular, ionic-angular, ionic1, custom, react, vue

Bad project type: undefined

When i select React, it gives a similar error but instead of vue-vite it would be react-vite for example.

Can you please run npm list -g and see if your version of the Ionic CLI is less than 7. If it is then run npm install @ionic/cli -g

Can you please run npm list -g and see if your version of the Ionic CLI is less than 7. If it is then run npm install @ionic/cli -g

It is CLI 7.1.1

I think the issue is that the extension is looking for 'vue' or 'react' but what is being created is 'vue-vite' and 'react-vite'.

If i open my older projects before these changes where made by the extension, they work fine.

What version of the extension are you using?
Later versions like 1.40.2 use v7 cli, but its possible that your version of VS Code are preventing upgrading the extension

What version of the extension are you using? Later versions like 1.40.2 use v7 cli, but its possible that your version of VS Code are preventing upgrading the extension

v1.40.2

I guess another possibility is that you have a local install of @ionic/cli that is below v7. Check the package.json of the project.

In any case, there must be a version of the @ionic/cli that is still at v6 that is getting picked up by the extension when it runs the ionic command.

Thanks, i will try a fresh install of everything.

Thanks @jensbroecher ,

I'll close the issue for now.