ionic-team / vscode-extension

15 stars 0 forks source link

Creating new projects fails #112

Closed jensbroecher closed 1 year ago

jensbroecher commented 1 year ago

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.

dtarnawsky commented 1 year ago

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

jensbroecher commented 1 year ago

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.

dtarnawsky commented 1 year ago

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

jensbroecher commented 1 year ago

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

dtarnawsky commented 1 year ago

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.

jensbroecher commented 1 year ago

Thanks, i will try a fresh install of everything.

dtarnawsky commented 1 year ago

Thanks @jensbroecher ,

I'll close the issue for now.