N
Nuxt6mo ago
kogratte

Cannot extend layer

Hello guys! We're working on a brand new product how intend to use the same building blocks than our main app. In order to do so, we want to move common blocks (aka design system, itself based on a layer), onto a shared and reusable package. To achieve that, we create a new layer using nuxi new, then add our first "inner layer" (design system), which itself extends a "child layer", based on vuetify. Our hierarchy looks like that: / /layers/design-system /layers/design-system/layers/vuetify We've been able to use our package through "nuxi dev", we've been able to build it using "nuxi build", and even to pack and publish it through a private npm repository. Now our foundations looks strong, we're trying to install it on our older project as a regular npm dep, and extend is from our main app. It looks like below:
yarn add -D our_shared_package // Which is, in fact, a packaged layer
// Then, in our main nuxt.config.ts
export default defineNuxtConfig({
extends: ['our_shared_package']
});
yarn add -D our_shared_package // Which is, in fact, a packaged layer
// Then, in our main nuxt.config.ts
export default defineNuxtConfig({
extends: ['our_shared_package']
});
But... Rather than working out of the box, nuxi is complaining about `Cannot extends from our_shared_package". I read the documentation again and again, check the package content and so on, and everything looks fine. We do not have a clue concerning what's not going right. Is there a way for us to deep dive into our issue and understand what need to be fixed, where and why?
1 Reply
kogratte
kogratteOP6mo ago
Tips: I've been able to make it work by extending ['./node_modules/our_shared_package'].
Want results from more Discord servers?
Add your server