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:
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.8 Replies
@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•17mo ago
Message Not Public
Sign In & Join Server To View
Are you using a component from layer that is failing?
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
Yeah, I would try to keep both extended layers and comment out the component you use.
Unknown User•17mo ago
Message Not Public
Sign In & Join Server To View
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•17mo ago
Message Not Public
Sign In & Join Server To View