Closed Bader-Idris closed 4 months ago
Is there a package.json
in your root folder?
If so then the extension thinks you want to only look at the root folder, rather a view that works as a multi-folder mono repo.
It will also work if you use any monorepo tech: npm workspaces etc.
The root folder does not have a package.json file
It's as 👇
Client/ Server/ DockerFiles
I created a sample repo with those 3 folders with an Ionic app in the Client folder: https://github.com/dtarnawsky/cs-mono-folder
The Ionic extension shows the project "Client" as expected like this:
Is there something special with your Client
folder? perhaps your app is several subfolders under Client
?
My GitHub repo, which, as I mentioned, isn't familiarized through the Ionic extension, serves as an example of what I meant.
Maybe there are privileges issues
Thanks for access to the repo. I found a couple of interesting things that the VS Code needed to handle (which have been done in v1.85.3 just released):
Your client
folder project is missing @capacitor/core
as a dependency. This is pretty unusual, and I wasn't aware that a project could function properly without it. I'd recommend adding this dependency back in. In any case the extension now handles this scenario (it relies on this dependency being there to consider the folder part of a monorepo).
Your client
folder also has a config.xml
which is usually for Cordova based projects. The extension didnt handle the format of this file - it now does in v1.85.3.
Your mentioned package is installed globally, and the XML file is newly added to the project. I assure you that it's not the cause because the issue was occurring before adding the file to the project. I also tried checking the extension after its latest update in the root directory, but it didn't recognize the existing project.
i have the same issue. the more weird is, it only happens on Win, when i work on Mac with the same repo which cloned from Win, the vs code with the same version ionic extension detects the ionic project and everything is fine. while on Win, the vs code can't detect the ionic project and the ionic panel shows nothing.
Hi @tylerxue, if you are able to provide a sample project that does not work then I can test it and fix any problems found.
I've tested the @Bader-Idris's repo on Windows and Mac and both work as expected.
Closing this issue as the original issue was addressed.
Since I have a full-stack project, I have included the front-end directory within the
client
subdirectory. This setup causes theIonic
extension to not recognize the workspace's working directory in Visual Studio Code. As a result, I am forced to open a separate Visual Studio Code window to access the extension's options.please use some regExp to make the extension understand subdirectories