Open MartinTruRating opened 1 year ago
Hello @MartinTruRating,
To be clear, your issue now is not being able to install dependencies ?
Also, /src
dir has your whole Nuxt logic ?
I encountered the same problem, when Workspace mode is enabled, Nuxtr recognizes the first item in the workspace by default, and when my project is not ranked first in the workspace, Nuxtr does not recognize the item I need, and currently I can only fix this problem when I move my project to the first place
@Administrator-M can you elaborate more about "my project is not ranked first in the workspace" ?
@adhamfarrag Hello, yeah so the /src
has everything in it from .nuxt
folder to node_modules
folder etc. But because the vscode editor is opened at the parent level above /src
it would try to install packages at that level (if I enabled workspace mode).
It's like we need a combination of the two in a setting where you can specifiy the rootDir
or something for where nuxtr starts working from
@MartinTruRating have you tried using "nuxtr.monorepoMode.DirectoryName": "src"
?
@adhamfarrag I did, so that then worked (as in I could use it to create components etc), but the problem then was when I tried to install/update any dependencies, it tried doing it in the folder above the src folder (which in a monorepo setup would be fine as the modules get installed into the root) rather than within the /src
folder.
I've added the following rough directory structure if this helps at all
$root
- .vscode
- other root files
- src (where the main app lives)
- - .nuxt
- - components
- - composables
- - node_modules
Got it.. I will refactor monorepo features and release it as soon as I can.
Brilliant, thank you very much! Make sure you still keep the monorepo functionality/compatibility for those that want to use that feature as I've used it on different projects :)
@adhamfarrag Thanks for your awesome work on this!
To add more info regarding the issue faced by @Administrator-M, when we create Multi-root Workspaces if the first folder has a different project, then all the features provided by Nuxtr are not available.
For example, if the multi-root workspace is like this, it works
However, this doesn't work
The reason for using this approach is both has different language/framework and have their own source control. They are just grouped using the multi-root workspace approach to avoid switching windows.
Experiencing the same issue. Here's my project structure:
├───apps
│ ├───application1
│ └───application2
└───packages
└───base
Experiencing the same issue. Here's my project structure:
├───apps │ ├───application1 │ └───application2 └───packages └───base
I have the same structure, and I'd love to use Nuxtr with the file creation templates it offers, but in my monorepo it won't activate...
Environment
Nuxt project info:
Build Modules: -
What went wrong?
I was trying to use nuxtr when my nuxt project lives within a subfolder within the workspace (ie
/src
). But it cannot find it (see belowIs there a config setting that allows it to set the root dir of nuxtr so it can then pick everything up and work?
I tried using the monorepo
DirectoryName
config setting set to/src
which enabled the extension and worked for things like creating components/stores etc but didn't for installing deps because it was trying to use the workspace root which is correct for a monorepo setup.How to reproduce it?
Install nuxt into a subfolder structure like this:
Nuxtr isn't available in the sidebar or command pallete