-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependencies from local package layer not installed/found #19124
Comments
This is a currently documented limitation of layers: https://nuxt.com/docs/getting-started/layers#layers. We can track support in #13367. |
@danielroe sorry, but where exactly is that documented on the page you linked? |
Sorry, should have linked https://nuxt.com/docs/guide/going-further/layers |
Thanks for awesome Layers feature of Nuxt. I have a question. Is auto-installing feature working in Nuxt modules? As example, If the module is placed in a relative path in filesystem, Nuxt - in this case - will auto install the module depencies with base project? |
No, Nuxt will not auto-install module dependencies; you can use your package manager to do that, though. yarn, pnpm and npm all support workspaces natively. |
@danielroe do i understand correctly, that we have to manually install packages are being used in a layer on our main app, that extends that layer? For example: That's expected behavior? |
New answer. With latest deps, you can opt-in to install: extends: [
['../my-layer', { install: true }]
] |
@pi0 i just removed dependency from this |
I also have
but it's throwing this error:
|
It would be very great to have this. We want to migrate our nuxt2 monorepo with 20 apps to nuxt 3 and managing 20 package.json deps is not something I'm looking forward to 🫣 |
@avxkim @DanCuatro if you can reproduce, please make a new issue 🙏🏼 |
Hey @pi0, it looks like @MuhammadM1998 has made a new issue with example repositories: #26479 I'm running into the same problem, even with completely fresh repositories. Could someone look into this? It would be greatly appreciated. :) |
The ongoing issue here seems to be about dev dependencies specifically. Runtime dependencies do work fine as @pi0 said. See my comment here and #26980. |
@Brads3290 It's not about |
@MuhammadM1998 My mistake. I assumed since it was a module that you were trying to depend on in your layer, that it was installed as a dev dependency (since |
Environment
Darwin
v18.13.0
3.1.1
2.1.1
npm@8.19.3
vite
extends
,shopware
,modules
,i18n
modules/domainRuntimeInfo
-
Reproduction
See bug report
Describe the bug
When using a local package as a nuxt layer, the dependencies do not get installed. Because of that, a module installed and registered in the layer will not be available in the project using the layer and result in the error message
I tried adding the layer package also a local dependency of the project, like so , but no success either.
I could obviously add the dependency to the project itself, too, but that's not the point of layers am I right?
Additional context
Layer package nuxt.config.js
Project using the layer nuxt.config.js
Logs
No response
The text was updated successfully, but these errors were encountered: