N
Nuxt17mo ago
Mads

Layer Extend broken on Vercel

Hi Using the mono repo strategy for Nuxt Layer causes deployments to fail on Vercel, if they contain just a single import of a component from a base layer. Component:
// Layer 1 (base) - Counter.vue
<template>
<div>
Hello World
</div>
</template>
// Layer 1 (base) - Counter.vue
<template>
<div>
Hello World
</div>
</template>
// Layer 2
<template>
<div>
<Counter />
</div>
</template>
// Layer 2
<template>
<div>
<Counter />
</div>
</template>
Deploying an extended Nuxt project on Vercel that contains a component, causes Rollup to fail: [error] [vite]: Rollup failed to resolve import "vue/server-renderer" from "/vercel/path0/base/components/Counter.vue" Reproduction: https://github.com/madsh93/layer-min-repo Should also be noted if any modules are using in the component, they will fail to import as well.
No description
8 Replies
Mads
MadsOP17mo ago
@Liliane I think this may be the issue you are encountering as well. The second layer you are extending is, i'm assuming, using a component. Seems components are causing fails in deployment. The error message you are getting is not Rollup failed to resolve import "vue/server-renderer" but something from the component inside the layer.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Mads
MadsOP17mo ago
Are you using a component from layer that is failing?
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Mads
MadsOP17mo ago
Yeah, I would try to keep both extended layers and comment out the component you use.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Mads
MadsOP17mo ago
I don't think you are doing anything wrong. I believe Nuxt has a bug where it will fail deployment as soon as you extend and use a component.
Unknown User
Unknown User17mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server